#include<bits/stdc++.h>
#define endl '\n'
using namespace std;
const int debug = 0;
int32_t main(){
int n;
cin >> n;
vector <vector <pair <int, int>>> res;
for(int i = 0;i < n-44;i++){
vector <pair <int, int>> aux;
for(int j = 1;j+1 <= n;j += 2)
aux.push_back({j, j+1});
res.push_back(aux);
aux.clear();
for(int j = 2;j+1 <= n;j += 2){
aux.push_back({j, j+1});
}
res.push_back(aux);
}
cout << res.size() << endl;
for(auto vec : res){
for(auto x : vec){
cout << "CMPSWP R" << min(x.first, x.second) << " R" << max(x.first, x.second) << ' ';
}
cout << endl;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Integer parameter [name=t] equals to 0, violates the range [1, 28] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Integer parameter [name=t] equals to 0, violates the range [1, 78] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Integer parameter [name=t] equals to 0, violates the range [1, 120] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
344 KB |
Integer parameter [name=t] equals to 0, violates the range [1, 496] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
356 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
1 ms |
348 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
1 ms |
344 KB |
Partially correct |