# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
414547 | 2021-05-30T16:01:03 Z | medmdg | MalnaRISC (COI21_malnarisc) | C++14 | 10 ms | 460 KB |
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n; cin>>n; vector<pair<ll,ll> > ans; for(int i=1;i<=n/2;i++){ for(int j=i+1;j<=n/2;j++){ ans.push_back(make_pair(i,j)); } } for(int i=n/2+1;i<n;i++){ for(int j=i+1;j<=n;j++){ ans.push_back(make_pair(i,j)); } } ll k=ans.size(); for(int i=1;i<=n/2;i++){ for(int j=n/2+1;j<=n;j++){ ans.push_back(make_pair(i,j)); } } cout<<ans.size()<<endl; for(int i=0;i<ans.size();i++){ cout<<"CMPSWP R"<<ans[i].first<<" R"<<ans[i].second<<endl; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | not sorted |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | not sorted |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | not sorted |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 204 KB | not sorted |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 332 KB | not sorted |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 332 KB | not sorted |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 332 KB | not sorted |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 7 ms | 332 KB | not sorted |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 8 ms | 460 KB | not sorted |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 10 ms | 460 KB | not sorted |