#include <bits/stdc++.h>
using namespace std;
int N;
string s = "CMPSWP";
#define pii pair<int, int>
#define fi first
#define se second
#define mp make_pair
vector<vector<pii>> v;
void solve(){
cout << v.size() << '\n';
for(auto& a : v){
int n = a.size();
for(int i = 0; i < n; i++){
cout << s << " " << a[i].fi << " " << a[i].se << (i == n - 1 ? '\n' : ' ');
}
}
}
int main(){
ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
cin >> N;
for(int i = 1; i <= 2 * N; i++){
v.push_back({});
if(i & 1){
for(int j = 1; j < N; j += 2) v.back().push_back(mp(j, j + 1));
}else{
for(int j = 2; j < N; j += 2) v.back().push_back(mp(j, j + 1));
}
if(v.back().empty()) v.pop_back();
}
solve();
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
332 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
332 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
460 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
460 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
4 ms |
460 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
3 ms |
460 KB |
Token "1" doesn't correspond to pattern "R[0-9]{1,3}" |