# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
154154 | 2019-09-18T16:16:18 Z | nicolaalexandra | Computer Network (BOI14_network) | C++14 | 125 ms | 8184 KB |
#include <iostream> #include "network.h" #include <cstring> using namespace std; int f[1010]; /*void travelTo (int x){ cout<<x<<" "; } int ping (int a, int b){ /// dist minima de la a la b cout<<"? "<<a<<" "<<b<<endl; int ans; cin>>ans; return ans; }*/ void findRoute (int n, int a, int b){ memset (f,0,sizeof f); int dist = ping (a,b); int nod = a; f[a] = 1; for (;;){ dist--; if (dist == -1){ travelTo(b); break; } for (int i=1;i<=n;i++){ if (f[i]) continue; if (ping(nod,i) == 0 && ping (i,b) == dist){ travelTo(i); nod = i; f[nod] = 1; break; }}}}
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 120 ms | 8184 KB | Too many calls to ping |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 107 ms | 6648 KB | Output is correct |
2 | Correct | 28 ms | 2908 KB | Output is correct |
3 | Correct | 124 ms | 8020 KB | Output is correct |
4 | Correct | 93 ms | 6272 KB | Output is correct |
5 | Correct | 125 ms | 7928 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 110 ms | 6764 KB | Too many calls to ping |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 110 ms | 6864 KB | Too many calls to ping |
2 | Halted | 0 ms | 0 KB | - |