# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
371176 | daniel920712 | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++14 | 0 ms | 0 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.
last[1]=1;
for(i=2;i<=N;i++)
{
if(all[i]>=all[i-1]) last[i]=last[i-1];
else last[i]=i;
}
while(M--)
{
scanf("%d %d %d",&x,&y,&z);
if(last[y]<=x) printf("1\n");
else printf("0\n");
}