# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
986397 | Pyqe | Ancient Books (IOI17_books) | C++17 | 269 ms | 82364 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>
#include "books.h"
using namespace std;
const long long inf=1e18;
long long n,a[1000069],fh[2][1000069],nr[1000069],dsu[1000069];
bitset<1000069> vtd,vtd2;
queue<long long> q;
long long fd(long long x)
{
if(dsu[x]!=x)
{
dsu[x]=fd(dsu[x]);
}
return dsu[x];
}
void ad(long long x,long long w)
{
long long i,p,sz;
vector<long long> v;
for(p=fh[0][x];fd(p)<=fh[1][x];dsu[fd(p)]=fd(fd(p)+1))
{
q.push(fd(p));
nr[fd(p)]=w;
v.push_back(fd(p));
}
# | 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... |