# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
404013 | ScarletS | Sjeckanje (COCI21_sjeckanje) | C++17 | 893 ms | 51148 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 <bits/stdc++.h>
#define ll long long
using namespace std;
const int mn = 2e5+4;
const ll INF = -1e17;
ll seg[mn*4][9],lazy[mn*4];
ll f(int i, int j)
{
if (j==0||j==6||j==7)
return seg[i][j];
if (j==2||j==4)
return seg[i][j]+lazy[i];
if (j==1||j==3)
return seg[i][j]-lazy[i];
if (j==8)
return seg[i][j]+lazy[i]*2;
return seg[i][j]-lazy[i]*2;
}
void passDown(int i)
{
lazy[i*2+1]+=lazy[i];
lazy[i*2+2]+=lazy[i];
lazy[i]=0;
}
void recalc(int i)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |