# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
525238 | 2022-02-11T07:28:46 Z | veos | Hedgehog Daniyar and Algorithms (IZhO19_sortbooks) | C++11 | 570 ms | 11920 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]); p: int c=b[0]; int r,l,k; bool f = true; scanf("%d %d %d",&r,&l,&k); for(int i=r; f && i<=l;i++){ if(c>b[i]) { if(c+b[i]>k) f=false; } else c=b[i]; } printf("%d",f); m--; if(m>0) goto p; }
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 | Incorrect | 543 ms | 11920 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 570 ms | 1232 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 | - |