# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
151881 | 2019-09-05T09:30:38 Z | Ruxandra985 | Computer Network (BOI14_network) | C++14 | 116 ms | 8072 KB |
#include <cstdio> #include "network.h" void findRoute (int n,int a,int b){ int da[n+1],db[n+1]; int i,curr,x,y,xn,yn,nxt; for (i=1;i<=n;i++){ if (i!=a) da[i] = ping (a,i); if (i!=b) db[i] = ping (b,i); } curr = a; x = -1; y = da[b]; while (curr!=b){ for (i=1;i<=n;i++){ if (i!=curr){ if (i!=b){ xn = da[i]; yn = db[i]; } else { xn = da[i]; yn = -1; } if (x+1 == xn && y-1 == yn && ping(curr,i)==0){ nxt = i; break; } } } travelTo(nxt); curr = nxt; x++; y--; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 116 ms | 7952 KB | Too many calls to ping |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 106 ms | 6656 KB | Output is correct |
2 | Correct | 27 ms | 2856 KB | Output is correct |
3 | Correct | 116 ms | 7828 KB | Output is correct |
4 | Correct | 94 ms | 6136 KB | Output is correct |
5 | Correct | 115 ms | 8072 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 106 ms | 6672 KB | Output is correct |
2 | Correct | 28 ms | 2808 KB | Output is correct |
3 | Correct | 116 ms | 7876 KB | Output is correct |
4 | Correct | 97 ms | 6260 KB | Output is correct |
5 | Correct | 115 ms | 7964 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 107 ms | 6844 KB | Too many calls to ping |
2 | Halted | 0 ms | 0 KB | - |