# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
364454 | thanksone | Game (IOI13_game) | C++14 | 4041 ms | 171176 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>
#define ff first
#define ss second
#define mid (l + r) / 2
using namespace std;
int R, C;
long long gcd(long long a, long long b){
if(!b) return a;
if(!a) return b;
return gcd(b, a % b);
}
struct segleaf{
long long val;
pair<long long, int> tag;
segleaf *lc, *rc;
segleaf(){lc = rc = nullptr, val = 0, tag = {0, 0};}
segleaf(long long v, int y){lc = rc = nullptr, val = v, tag = {v, y};}
inline void pull(){
val = gcd((lc? lc->val : 0), (rc? rc->val : 0));
}
inline void push(int m){
if(tag.ff){
if(tag.ss <= m) lc = new segleaf(tag.ff, tag.ss);
else rc = new segleaf(tag.ff, tag.ss);
tag = {0, 0};
}
}
void update(int y, int l, int r, long long v){
if(y == l && y == 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... |