90 pts 求助
查看原帖
90 pts 求助
945742
hexuchen楼主2024/1/27 23:52

https://www.luogu.com.cn/record/144723102

#5 WA了

代码:

#include <bits/stdc++.h>
using namespace std;
int n,m,k,h=1,l=1;
char a;
char ans[10001][10001];
int main(){
	cin>>n>>m>>k;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			cin>>a;
			for(int i=h;i<h+k;i++){
				for(int j=l;j<l+k;j++){
					ans[i][j]=a;
				}
			}
			l+=k;
			if(l>=(m*k)){
				h+=k;
				l=1;
			}		
		}
	}
	for(int i=1;i<=n*k;i++){
		for(int j=1;j<=m*k;j++){
			cout<<ans[i][j];
		}
		cout<<endl;
	}
	return 0;
}
/*
4 3 2
%%%
$$$
@w@
!!!
*/
2024/1/27 23:52
加载中...