# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1166246 | Hanksburger | Game (IOI13_game) | C++20 | 0 ms | 328 KiB |
#include "game.h"
#include <bits/stdc++.h>
#define ll long long
using namespace std;
struct node
{
node *leftchild1=0, *rightchild1=0, *leftchild2=0, *rightchild2=0;
int segtree=0;
} root;
ll large=5;
void update2(node& i, ll l1, ll r1, ll l2, ll r2, ll x, ll y, ll z)
{
//cout << "update2 " << l1 << ' ' << r1 << ' ' << l2 << ' ' << r2 << '\n';
if (l2==r2)
{
if (l1==r1)
i.segtree=z;
else
i.segtree=gcd(i.leftchild1==0?0:i.leftchild1->segtree, i.rightchild1==0?0:i.rightchild1->segtree);
//cout << "segtree " << l1 << ' ' << r1 << ' ' << l2 << ' ' << r2 << " = " << i.segtree << '\n';
return;
}
ll mid=(l2+r2)/2;
if (y<=mid)
{
if (i.leftchild2==0)
i.leftchild2=new node;
//cout << "here\n";
if (i.leftchild1!=0)
i.leftchild2->leftchild1=i.leftchild1->leftchild2;
# | 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... |