# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
379563 | WLZ | Game (IOI13_game) | C++14 | 5103 ms | 101100 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 "game.h"
#include <bits/stdc++.h>
using namespace std;
int r, c;
long long gcd(long long a, long long b) {
while (b > 0) {
swap(a, b);
b %= a;
}
return a;
}
struct node {
int l, r, idx;
long long val;
node *left, *right;
node(int _l, int _r) : l(_l), r(_r), idx(-1), val(-1), left(nullptr), right(nullptr) {}
};
void update(node *cur, int idx, long long val);
void propagate(node *cur, int idx, long long val) {
if (idx <= (cur->l + cur->r) / 2) {
if (cur->left == nullptr) cur->left = new node(cur->l, (cur->l + cur->r) / 2);
update(cur->left, idx, val);
} else {
if (cur->right == nullptr) cur->right = new node((cur->l + cur->r) / 2 + 1, cur->r);
# | 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... |