Submission #520567

# Submission time Handle Problem Language Result Execution time Memory
520567 2022-01-30T09:13:34 Z topovik MalnaRISC (COI21_malnarisc) C++14
1.02778 / 100
2 ms 332 KB
#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 = 100;
//    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 time Memory Grader output
1 Incorrect 1 ms 204 KB Integer parameter [name=t] equals to 100, violates the range [1, 28]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Integer parameter [name=t] equals to 100, violates the range [1, 78]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 1 ms 204 KB Partially correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB not sorted
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB not sorted
2 Halted 0 ms 0 KB -