Submission #420590

# Submission time Handle Problem Language Result Execution time Memory
420590 2021-06-08T12:50:35 Z MetalPower MalnaRISC (COI21_malnarisc) C++14
0 / 100
2 ms 332 KB
#include <bits/stdc++.h>
using namespace std;

int N;
string s = "CMPSWP";

#define pii pair<int, int>
#define fi first
#define se second
#define mp make_pair

vector<vector<pii>> v;

void solve(){
	cout << v.size() << '\n';
	for(auto& a : v){
		int n = a.size();
		for(int i = 0; i < n; i++){
			cout << s << " " << a[i].fi << " " << a[i].se << (i == n - 1 ? '\n' : ' ');
		}
	}
}

int main(){
	ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);

	cin >> N;

	for(int i = 1; i <= N + 1; i++){
		v.push_back({});
		if(i & 1){
			for(int j = 1; j < N; j += 2) v.back().push_back(mp(j, j + 1));
		}else{
			for(int j = 2; j < N; j += 2) v.back().push_back(mp(j, j + 1));
		}
	}

	solve();
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB Token "1" doesn't correspond to pattern "R[0-9]{1,3}"