Submission #1002437

#TimeUsernameProblemLanguageResultExecution timeMemory
1002437definitelynotmeeMalnaRISC (COI21_malnarisc)C++17
0 / 100
1 ms456 KiB
#include<bits/stdc++.h> #define all(x) x.begin(), x.end() #define ff first #define ss second #define O_O using namespace std; template <typename T> using bstring = basic_string<T>; template <typename T> using matrix = vector<vector<T>>; typedef unsigned int uint; typedef unsigned long long ull; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; typedef double dbl; typedef long double dbll; const ll INFL = 4e18+25; const int INF = 1e9+42; const double EPS = 1e-7; const int MOD = (1<<23)*17*7 + 1; // 998244353 const int RANDOM = chrono::high_resolution_clock::now().time_since_epoch().count(); const int MAXN = 1e6+1; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; mt19937 rng(RANDOM); int attempt = 28; cout << attempt << '\n'; const string q = "CMPSWP"; auto query =[&](int a, int b){ return q + " R" + to_string(a) + " R" + to_string(b); }; vector<int> o(n); iota(all(o),0); shuffle(all(o),rng); while (attempt--){ for(int i = 1; i < n; i+=2){ if(o[i] < o[i-1]) swap(o[i],o[i-1]); cout << query(o[i-1], o[i]) << ' '; } cout << '\n'; } 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...