# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
526251 | 2022-02-14T04:37:27 Z | veos | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++11 | 3000 ms | 6212 KB |
#include <stdio.h> using namespace std; int main(){ int n,m; scanf("%d %d",&n,&m); int b[n++]; b[0]=0; for(int i=1;i<n;i++) scanf("%d",&b[i]); do{ int c=b[0]; int r,l,k; bool f = true; scanf("%d %d %d",&r,&l,&k); for(int i=r; i<=l;i++){ if(c>b[i]&&c+b[i]>f){ f=false; break; } else if(c<b[i]) c=b[i]; } printf("%d\n",f); m--; }while(m>0); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 528 ms | 6148 KB | Output is correct |
2 | Correct | 534 ms | 6096 KB | Output is correct |
3 | Correct | 543 ms | 6136 KB | Output is correct |
4 | Correct | 526 ms | 6212 KB | Output is correct |
5 | Execution timed out | 3094 ms | 4288 KB | Time limit exceeded |
6 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 45 ms | 836 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 204 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |