Submission #1263126

#TimeUsernameProblemLanguageResultExecution timeMemory
1263126M_W_13Mixture (BOI20_mixture)C++20
0 / 100
0 ms320 KiB
#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define st first
#define nd second
#define pb push_back

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int seed;
    cin >> seed;
    srand(seed);
    int x = rand() % 10000 + 1;
    int y = rand() % 10000;
    int z = rand() % 10000;
    cout << x << " " << y << " " << z << '\n';
    int n = rand() % 1000 + 1;
    cout << n << '\n';
    int ile = 0;
    int pom = 1;
    set<int> jakie;
    int ktor = 1;
    rep(i, n) {
        int c = rand() % 2;
        if (ile == 0) {
            c = 0;
        }
        if (c == 0) {
            x = rand() % 10000 + 1;
            y = rand() % 10000;
            z = rand() % 10000;
            cout << "A " << x << " " << y << " " << z << '\n';
            jakie.insert(ktor);
            ktor++;
            ile++;
        }
        else {
            int sz = jakie.size();
            int kt = rand() % sz;
            int xx = 0;
            for (auto x: jakie) {
                if (kt == 0) {
                    xx = x;
                }
                kt--;
            }
            jakie.erase(xx);
            cout << "R " << xx << '\n';
            ile--;
        }
    }
    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...