Submission #520564

#TimeUsernameProblemLanguageResultExecution timeMemory
520564topovikMalnaRISC (COI21_malnarisc)C++14
0 / 100
2 ms332 KiB
#include <bits/stdc++.h> #pragma GCC optimize("unroll-loops") #define pb push_back #define f first #define s second using namespace std; typedef long long ll; typedef long double ld; const ll oo = 1e18; const ld eps = 1e-9; const int N = 1e3; const int M = 6e5; int good[N]; int main() { ios_base::sync_with_stdio(0); iostream::sync_with_stdio(0); cin.tie(0); cout.tie(0); srand(time(NULL)); int n; cin >> n; int t = n; // if (n == 8) t = 6; // if (n == 13) t = 10; // if (n == 16) t = 10; // if (n == 32) t = 15; // if (n == 53) t = 21; // if (n == 64) t = 21; // if (n == 73) t = 28; // if (n == 82) t = 28; // if (n == 91) t = 29; // if (n == 100) t = 30; cout << t << endl; for (int i = 0; i < t; i++) { for (int j = 0; j < n; j++) good[j] = 0; for (int i = 0; i < n / 2; i++) { int x = rand() % n; while (good[x]) x = rand() % n; good[x] = 1; int y = rand() % n; while (good[y]) y = rand() % n; good[y] = 1; if (x > y) swap(x, y); cout <<"CMPSWP R" << x + 1 << " R" << y + 1 << " "; } cout << endl; } }
#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...