Submission #420668

#TimeUsernameProblemLanguageResultExecution timeMemory
420668JvThunderMalnaRISC (COI21_malnarisc)C++14
2.16 / 100
1 ms460 KiB
#include <bits/stdc++.h> #define pb push_back #define mp make_pair #define fir first #define sec second typedef long long ll; using namespace std; int n; bool cmp(int a,int b,int c,int d) { if(a!=c && a!=d && b!=c && b!=d) return true; return false; } void solve() { cin >> n; vector<pair<int,int>> v[105]; int cnt = 0; for(int i=1;i<=n;i++) { for(int j=i+1;j<=n;j++) { cnt++; v[cnt].pb({i,j}); } } cout << cnt << endl; for(int i=1;i<=cnt;i++) { for(auto x:v[i]) { cout << "CMPSWP R" << x.fir << " R" << x.sec << " "; } cout << endl; } return; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int tc=1; //cin>>tc; for(int i=1;i<=tc;i++) solve(); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...