# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
851556 | heeheeheehaaw | Sum Zero (RMI20_sumzero) | C++17 | 1084 ms | 24228 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 <iostream>
#include <map>
using namespace std;
const int baza = 80, lg = 3;
int v[400005], bl[400005][3];
int query(int u, int v)
{
int rez = 0, put = 80 * 80;
for(int j = 2; j >= 0; j--)
{
for(int i = 1; i <= 79; i++)
if(bl[u][j] <= v)
{
u = bl[u][j];
rez += put;
}
put /= 80;
}
return rez;
}
int main()
{
int n, q;
cin>>n;
for(int i = 1; i <= n; 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... |