| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 499027 | IOI_champion_in_1980 | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++14 | 1641 ms | 6304 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 <math.h>
typedef long long ll;
using namespace std;
ll i, j, t, a, n, m, b, c, d, f, g;
int x[1000100], y[1000100];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
cin>>n>>m;
for (a=1; a<=n; a++) cin>>x[a];
for (a=1; a<=m; a++)
{
int l, r, k;
cin>>l>>r>>k;
int mmax=INT_MIN;
int ans=1;
for (b=r; b>=l; b--)
{
if (mmax<x[b])
{
if (mmax+x[b]>k)
{
ans=0;
break;
}
mmax=x[b];
continue;
}
}
cout<<ans<<endl;
}
}
/*
*/
| # | 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... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
