# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1166229 | Hanksburger | Game (IOI13_game) | C++20 | 3900 ms | 244984 KiB |
#include "game.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int leftchild1[10400000], rightchild1[10400000], leftchild2[10400000], rightchild2[10400000];
ll segtree[10400000], large=1e9, cnt;
ll createNode()
{
return (cnt++);
}
void update2(ll i, ll l1, ll r1, ll l2, ll r2, ll x, ll y, ll z)
{
if (l2==r2)
{
if (l1==r1)
segtree[i]=z;
else
segtree[i]=gcd(segtree[leftchild1[i]], segtree[rightchild1[i]]);
return;
}
ll mid=(l2+r2)/2;
if (y<=mid)
{
if (!leftchild2[i])
leftchild2[i]=createNode();
leftchild1[leftchild2[i]]=leftchild2[leftchild1[i]];
rightchild1[leftchild2[i]]=leftchild2[rightchild1[i]];
update2(leftchild2[i], l1, r1, l2, mid, x, y, z);
}
else
# | 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... |