UVa1605,Building for UN

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

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

#include <iostream>
#include <cstring>
#include <cstdio>
#include <string>
#include <algorithm>
#define maxn 100000
using 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

 

posted @ 2014-08-01 14:27  ACBingo  阅读(359)  评论(0编辑  收藏  举报