# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
752461 | 2023-06-03T03:50:59 Z | salmon | Computer Network (BOI14_network) | C++14 | 81 ms | 4208 KB |
#include "network.h" #include <bits/stdc++.h> using namespace std; void findRoute (int N, int a, int b){ int dist[N + 5]; vector<pair<int,int>> v; for(int i = 1; i < N; i++){ if(i != a && i != b){ dist[i] = ping(i,b) + 1; v.push_back(make_pair(dist[i],i)); } else{ dist[i] = 10000; } } int d = N; sort(v.begin(),v.end(),greater<pair<int,int>>()); for(int i = 0; i < N - 1; i++){ if(v[i].first == d){ continue; } if(ping(v[i].second,a) + 1 == 1){ a = v[i].second; d--; travelTo(a); } } travelTo(b); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 81 ms | 4208 KB | ping called with invalid arguments |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 75 ms | 4144 KB | ping called with invalid arguments |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 77 ms | 4140 KB | ping called with invalid arguments |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 81 ms | 4204 KB | ping called with invalid arguments |
2 | Halted | 0 ms | 0 KB | - |