Submission #1002894

# Submission time Handle Problem Language Result Execution time Memory
1002894 2024-06-19T21:09:08 Z Juan MalnaRISC (COI21_malnarisc) C++17
0 / 100
1 ms 348 KB
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define pii pair<int,int>

void print(int a, int b){
	cout << "CMPSWP ";
	cout << "R" << a << " ";
	cout << "R" << b << " ";
}

int main(){
	int n; cin >> n;

	int magic=n;
	if(n<=20) magic=n;
	cout << magic << '\n';
	for(int i=0; i<magic; i++){
		if(i%2) for(int j=1; j<n-j+1; j++){
			print(j,n-j+1);
		}
		else for(int j=1; j<n; j+=2){
			print(j,j+1);
		}
		cout << '\n';
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB not sorted
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 344 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 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 Incorrect 1 ms 348 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB not sorted
2 Halted 0 ms 0 KB -