# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
752458 | 2023-06-03T03:49:00 Z | salmon | Computer Network (BOI14_network) | C++14 | 87 ms | 4240 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){ dist[i] = ping(i,b) + 1; v.push_back(make_pair(dist[i],i)); } } 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){ a = v[i].second; d--; travelTo(a); } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 70 ms | 4172 KB | ping called with invalid arguments |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 70 ms | 4224 KB | ping called with invalid arguments |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 87 ms | 4240 KB | ping called with invalid arguments |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 85 ms | 4180 KB | ping called with invalid arguments |
2 | Halted | 0 ms | 0 KB | - |