# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
216930 | 2020-03-28T13:22:17 Z | bharat2002 | Computer Network (BOI14_network) | C++14 | 137 ms | 5112 KB |
/*input */ #include "network.h" #include<bits/stdc++.h> using namespace std; const int N=1e3 + 100; int dista[N], distb[N]; bool sf(int a, int b) { return dista[a]<dista[b]; } void findRoute(int n, int a, int b) { for(int i=1;i<=n;i++) { if(i==a) continue; dista[i]=ping(i, a) +1; } for(int i=1;i<=n;i++) { if(i==b) continue; distb[i]=ping(i, b) + 1; } vector<int> vals; for(int i=1;i<=n;i++) { if(dista[i] + distb[i]==dista[b]) { vals.push_back(i); } } sort(vals.begin(), vals.end()); for(auto i:vals) { travelTo(i); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 137 ms | 5112 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 121 ms | 4956 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 125 ms | 5048 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 125 ms | 4984 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |