#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops")
#define pb push_back
#define f first
#define s second
using namespace std;
typedef long long ll;
typedef long double ld;
const ll oo = 1e18;
const ld eps = 1e-9;
const int N = 1e3;
const int M = 6e5;
const ld t = 0.9;
int main()
{
ios_base::sync_with_stdio(0);
iostream::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
int k = n - 1;
cout << k << endl;
for (int i = 0; k > 0; i++)
{
for (int j = 0; j + 1 < n; j += 2) cout << "CMPSWP R" << j + 1 << " R" << j + 2 << " ";
cout << endl;
k--;
if (k == 0) break;
for (int j = 1; j + 1 < n; j += 2) cout << "CMPSWP R" << j + 1 << " R" << j + 2 << " ";
cout << endl;
k--;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
204 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
1 ms |
332 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
1 ms |
332 KB |
Partially correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
not sorted |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Partially correct |
1 ms |
332 KB |
Partially correct |