# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
42603 | 2018-02-28T20:15:25 Z | Hassoony | 컴퓨터 네트워크 (BOI14_network) | C++14 | 162 ms | 58832 KB |
#include<bits/stdc++.h> #define S second #define F first using namespace std; #include "network.h" int l; vector<pair<int,int> >v; vector<int>ans; void findRoute(int n,int a,int b){ v.push_back({0,a}); for(int i=1;i<=n;i++){ if(i==a)continue; v.push_back({ping(a,i),i}); } sort(v.begin(),v.end()); while(v.back().S!=b)v.pop_back(); l=v.size()-1; ans.push_back(b); for(int i=v.size()-2;i>=0;i--){ int dis=ping(v[i].S,v[l].S); if(dis+v[i].F==v[l].F-1){ l=i; ans.push_back(v[i].S); } } reverse(ans.begin(),ans.end()); for(auto pp:ans)travelTo(pp); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 117 ms | 8020 KB | Output is correct |
2 | Correct | 112 ms | 11272 KB | Output is correct |
3 | Correct | 98 ms | 14152 KB | Output is correct |
4 | Correct | 104 ms | 17048 KB | Output is correct |
5 | Correct | 100 ms | 19572 KB | Output is correct |
6 | Correct | 98 ms | 22008 KB | Output is correct |
7 | Correct | 1 ms | 22008 KB | Output is correct |
8 | Correct | 1 ms | 22008 KB | Output is correct |
9 | Correct | 1 ms | 22008 KB | Output is correct |
10 | Correct | 2 ms | 22008 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 105 ms | 24656 KB | Output is correct |
2 | Correct | 25 ms | 24656 KB | Output is correct |
3 | Correct | 123 ms | 28712 KB | Output is correct |
4 | Correct | 90 ms | 30824 KB | Output is correct |
5 | Correct | 116 ms | 34396 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 102 ms | 36912 KB | Output is correct |
2 | Correct | 25 ms | 36912 KB | Output is correct |
3 | Correct | 112 ms | 41088 KB | Output is correct |
4 | Correct | 89 ms | 43000 KB | Output is correct |
5 | Correct | 134 ms | 46624 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 106 ms | 49160 KB | Output is correct |
2 | Correct | 26 ms | 49160 KB | Output is correct |
3 | Correct | 162 ms | 53172 KB | Output is correct |
4 | Correct | 89 ms | 55212 KB | Output is correct |
5 | Correct | 120 ms | 58832 KB | Output is correct |