# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
490506 | 2021-11-27T16:50:19 Z | fuad27 | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++17 | 3000 ms | 8100 KB |
#include<bits/stdc++.h> using namespace std; const long long N = 1e6 + 10; int main () { int n, m; cin >> n >> m; long long arr[n]; for(int i = 0;i<n;i++)cin>>arr[i]; while(m--) { int l, r, m; cin >> l >> r >> m; long long MAX = 0, MIN = 1e18; bool check = true; for(int i = l-1;i<r;i++) { MAX = max(MAX, arr[i]); if(arr[i] < MAX and MAX - arr[i] > m) { check=0; } } cout << check << endl; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Incorrect | 1 ms | 204 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Incorrect | 1 ms | 204 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3075 ms | 8100 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2871 ms | 1468 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Incorrect | 1 ms | 204 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 204 KB | Output is correct |
2 | Correct | 0 ms | 204 KB | Output is correct |
3 | Incorrect | 1 ms | 204 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |