Submission #382095

#TimeUsernameProblemLanguageResultExecution timeMemory
382095vishesh312Memory (IOI10_memory)C++17
100 / 100
4 ms512 KiB
#include "bits/stdc++.h"
#include "memory.h"
#include "grader.h"
using namespace std;
/*
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using ordered_set = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;
*/

#define all(x) begin(x), end(x)
#define sz(x) (int)x.size()

using ll = long long;
const int mod = 1e9+7;

void play() {
    vector<bool> found(26);
    vector<array<int, 2>> pos(26);
    for (int i = 1; i <= 50; ++i) {
        char c = faceup(i);
        if (found[c-'A']) {
            pos[c-'A'][1] = i;
        } else {
            found[c-'A'] = true;
            pos[c-'A'][0] = i;
        }
    }
    for (int i = 0; i < 25; ++i) {
        faceup(pos[i][0]);
        faceup(pos[i][1]);
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...