首页 > 代码库 > UVa1605,Building for UN

UVa1605,Building for UN

我比较好奇的是uva后台是怎么测这题的

没什么可说的,那些不想敲但还是想直接交这题的直接copy过去吧

#include <iostream>#include <cstring>#include <cstdio>#include <string>#include <algorithm>#define maxn 100000using namespace std;int main(){    int n;    while (cin>>n){        cout<<"2";        cout<<" "<<n<<" "<<n<<endl;        for (int i=0;i<n;i++){            for (int j=0;j<n;j++)                if (i<26) cout<<(char)(i+a);                    else cout<<(char)(i+A-26);            cout<<endl;        }        cout<<endl;        for (int i=0;i<n;i++){            for (int j=0;j<n;j++)                if (j<26) cout<<(char)(j+a);                    else cout<<(char)(j+A-26);            cout<<endl;        }        cout<<endl;    }}
View Code