Submission #1002884

# Submission time Handle Problem Language Result Execution time Memory
1002884 2024-06-19T21:00:51 Z Juan MalnaRISC (COI21_malnarisc) C++17
25.7222 / 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=4*n/5;
	if(n<=20) magic=n;
	cout << magic << '\n';
	for(int i=1; i<=magic; i++){
		for(int j=1+(i%2); j<n; j+=2){
			print(j,j+1);
		}
		cout << '\n';
	}
}
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 348 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 348 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 348 KB Partially correct
# 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 0 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 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 -