Submission #1002864

# Submission time Handle Problem Language Result Execution time Memory
1002864 2024-06-19T20:53:56 Z Juan MalnaRISC (COI21_malnarisc) C++17
10.7194 / 100
8 ms 1112 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*(int)sqrt(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 Partially correct 1 ms 344 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 344 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 3 ms 604 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 4 ms 604 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 5 ms 860 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 6 ms 856 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 8 ms 1112 KB Partially correct