# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
21000 | model_code | Swap (BOI16_swap) | C++11 | 183 ms | 38064 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 <iostream>
#include <climits>
using namespace std;
struct T {
T(int val) : val(val) { }
T(T* a, T* b, bool* d) : val(0), a(a), b(b), d(d) { }
int val;
T* a;
T* b;
bool* d;
int query() {
if(val) {
return val;
} else if(*d) {
return a->query();
} else {
return min(a->query(), b->query());
}
}
bool del(int x) {
if(val) {
if(val == x) {
val = INT_MAX;
return true;
}
return false;
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... |