#include <vector> #include <list> #include <map> #include <set> #include <deque> #include <queue> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <cctype> #include <string> #include <cstring> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> using namespace std; typedef long long LL; #define CLR(x,y) memset((x),(y),sizeof((x))) #define FOR(x,y,z) for(int (x)=(y);(x)<(z);++(x)) #define FORD(x,y,z) for(int (x)=(y);(x)>=(z);--(x)) #define FOR2(x,y,z) for((x)=(y);(x)<(z);++(x)) #define FORD2(x,y,z) for((x)=(y);(x)>=(z);--(x)) const int maxn = 51; char res[2][maxn][maxn]; int main(){ //freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); int n; bool flg = 0; while(~scanf("%d",&n)){ if(flg) puts(""); CLR(res,0); FOR(i,0,n){ FOR(j,0,n){ res[0][i][j] = i + (i >=26?‘a‘-26:‘A‘); res[1][i][j] = j + (j >=26?‘a‘-26:‘A‘); } } printf("%d %d %d\n",2,n,n); FOR(k,0,2){ FOR(i,0,n){ puts(res[k][i]); } puts(""); } flg = 1; } return 0; } |
[2016-03-04][UVA][1605][Building for UN]
原文:http://www.cnblogs.com/qhy285571052/p/5243467.html