Submission #1002942

# Submission time Handle Problem Language Result Execution time Memory
1002942 2024-06-19T21:36:34 Z PagodePaiva MalnaRISC (COI21_malnarisc) C++17
29.7298 / 100
2 ms 604 KB
#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-10;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 1 ms 348 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 356 KB not sorted
2 Halted 0 ms 0 KB -
# 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 1 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 1 ms 604 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 604 KB Partially correct