# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
426259 | 2021-06-13T16:09:08 Z | Amylopectin | Lightning Rod (NOI18_lightningrod) | C++14 | 2000 ms | 111424 KB |
#include <iostream> #include <stdio.h> using namespace std; const int mxn = 1e7 + 10; struct we { int xx,yy; }; struct we a[mxn] = {}; int main() { int i,j,n,m,ru = -1,cx,cy; scanf("%d",&n); for(i=0; i<n; i++) { scanf("%d %d",&cx,&cy); while(ru >= 0 && cx - a[ru].xx <= cy - a[ru].yy) { ru --; } if(cx - a[ru].xx > a[ru].yy - cy) { ru ++; a[ru] = {cx,cy}; } } printf("%d\n",ru + 1); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2037 ms | 111424 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 256 KB | Output is correct |
4 | Incorrect | 1 ms | 204 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 256 KB | Output is correct |
4 | Incorrect | 1 ms | 204 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 256 KB | Output is correct |
4 | Incorrect | 1 ms | 204 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 204 KB | Output is correct |
2 | Correct | 1 ms | 204 KB | Output is correct |
3 | Correct | 1 ms | 256 KB | Output is correct |
4 | Incorrect | 1 ms | 204 KB | Output isn't correct |
5 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2008 ms | 78424 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2037 ms | 111424 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |