-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path01605.cpp
66 lines (45 loc) · 1.21 KB
/
01605.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
// freopen("input.txt", "r", stdin);
// freopen("output.txt", "w", stdout);
ll n;
while(cin >> n){
cout << 2 << " " << n << " " << n << "\n";
char itr = 'A';
for(ll p = 0; p < n; p++){ // horizontal one
ll i = 1;
itr = 'A';
for(; i <= 26 && i <= n; i++){
cout << itr;
++itr;
}
itr = 'a';
for(; i <= 52 && i <= n; i++){
cout << itr;
++itr;
}
cout << "\n";
} cout << "\n";
itr = 'A';
ll i = 1;
for(; i <= 26 && i <= n; i++){ // vert 1
for(ll j = 0; j < n; j++){
cout << itr;
} cout << "\n";
++itr;
}
itr = 'a';
for(; i <= 52 && i <= n; i++){ // vert 2
for(ll j = 0; j < n; j++){
cout << itr;
} cout << "\n";
++itr;
}
// if(cin.good()) cout << "\n";
}
return 0;
}