# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
752440 | 2023-06-03T03:22:44 Z | jamielim | 컴퓨터 네트워크 (BOI14_network) | C++14 | 82 ms | 4244 KB |
#include "network.h" #include <bits/stdc++.h> using namespace std; #define fi first #define se second #define mp make_pair #define pb emplace_back typedef long long ll; typedef pair<int,int> ii; const int INF=1012345678; int dista[1005]; set<int> found; void findRoute (int N, int a, int b){ int d=ping(a,b)+1; found.insert(0); found.insert(d); memset(dista,-1,sizeof(dista)); dista[0]=a; dista[d]=b; for(int i=1;i<=N;i++){ if(i==a||i==b)continue; int x=ping(i,a)+1; if(dista[x]!=-1)continue; if(x>d)continue; auto it=found.upper_bound(x); int y=ping(i,dista[*it])+1; if(x+y==(*it)){ dista[x]=i; found.insert(x); } } for(int i=1;i<=d;i++)travelTo(dista[i]); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 72 ms | 4172 KB | Output is correct |
2 | Correct | 79 ms | 4196 KB | Output is correct |
3 | Correct | 80 ms | 4244 KB | Output is correct |
4 | Correct | 70 ms | 4140 KB | Output is correct |
5 | Correct | 80 ms | 4136 KB | Output is correct |
6 | Correct | 71 ms | 4164 KB | Output is correct |
7 | Correct | 0 ms | 212 KB | Output is correct |
8 | Correct | 1 ms | 340 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 340 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 78 ms | 4168 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 76 ms | 4168 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 82 ms | 4128 KB | Travelling to nonadjacent computer |
2 | Halted | 0 ms | 0 KB | - |