Submission #1002941

# Submission time Handle Problem Language Result Execution time Memory
1002941 2024-06-19T21:36:22 Z PagodePaiva MalnaRISC (COI21_malnarisc) C++17
28.7028 / 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-9;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 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 Partially correct 0 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 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 604 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 2 ms 604 KB Partially correct