# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
434307 | 2021-06-20T22:29:25 Z | JovanK26 | Lightning Conductor (POI11_pio) | C++14 | 31 ms | 2252 KB |
#include <cstdio> #include <cmath> #include <cstdlib> #define MAXIMUM(a,b) ((a)>(b)?(a):(b)) #define MAXN 100000 int N; int H[MAXN],HMax,MAXind; int main() { scanf("%d", &N); for(int i = 0; i < N; i++) scanf("%d", &H[i]); HMax = H[0]; MAXind = 0; for(int i = 1; i < N; i++) { if(H[i] > HMax) { MAXind = i; HMax = H[i]; } } for(int i = 0; i < N; i++) printf("%d\n", HMax-H[i] + (int) ceil(sqrt(abs(MAXind-i)))); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 284 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 204 KB | Output isn't correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 10 ms | 968 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 16 ms | 1348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 23 ms | 1356 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 31 ms | 1984 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 16 ms | 2252 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 16 ms | 2216 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 17 ms | 2192 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 16 ms | 2132 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |