Submission #423546

#TimeUsernameProblemLanguageResultExecution timeMemory
423546aymane7MalnaRISC (COI21_malnarisc)C++17
21.59 / 100
2 ms332 KiB
#include<bits/stdc++.h> #pragma GCC optimize("O2") #define deb(x) cout << #x << " = " << x <<endl #define F first #define S second #define PB push_back #define MP make_pair #define all(c) c.begin(), c.end() #define endl "\n" #define sz(u) (int)(u.size()) #define L(x)(2*x) #define R(x)(2*x+1) #define M(x,y)((x+y)/2) typedef long long ll; typedef unsigned long long ull; using namespace std; const int N=1e4+1; void solve(){ int n; cin>>n; cout<<n-1<<endl; for(int i=0;i<n-1;i++){ if(i%2==0) for(int j=1;j+1<=n;j+=2) cout<<"CMPSWP R"<<j<<" R"<<j+1<<" "; else for(int j=2;j+1<=n;j+=2) cout<<"CMPSWP R"<<j<<" R"<<j+1<<" "; cout<<endl; } } int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); solve(); }
#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...