# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
435860 | Noam527 | Keys (IOI21_keys) | C++17 | 2078 ms | 130260 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ldb;
const int md = 1e9 + 7;
const ll inf = 3e18;
const int OO = 0;
using namespace std;
const int N = 3e5 + 5;
struct group {
int root;
int state; // 0,1,2
int cursed; // 0,1
set<pair<int, int>> e;
set<int> k;
vector<int> q;
group() {}
int work() {
while (q.size()) {
int ke = q.back();
auto it = e.lower_bound(make_pair(ke, -1));
if (it != e.end() && it->first == ke) {
int res = it->second;
e.erase(it);
return res;
}
q.pop_back();
}
return -1;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |