# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
81047 | 2018-10-23T15:46:26 Z | xiaowuc1 | 컴퓨터 네트워크 (BOI14_network) | C++14 | 143 ms | 19552 KB |
#include <bits/stdc++.h> #include "network.h" /* unsigned seed1 = std::chrono::system_clock::now().time_since_epoch().count(); mt19937 g1.seed(seed1); ios_base::sync_with_stdio(false); cin.tie(NULL); */ using namespace std; const double PI = 2 * acos(0); typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<int, ll> pill; typedef pair<ll, ll> pll; typedef long double ld; typedef vector<vector<ll>> matrix; bool used[1005]; void solve(int n, int a, int b, int d) { if(d == 0) { travelTo(b); return; } for(int k = 1; k <= n; k++) { if(used[k]) continue; int d1 = ping(a, k); int d2 = ping(k, b); used[k] = true; if(d1 + d2 + 1 == d) { solve(n, a, k, d1); solve(n, k, b, d2); return; } } assert(false); } void findRoute(int n, int a, int b) { memset(used, 0, sizeof(used)); int dd = ping(a, b); used[a] = true; used[b] = true; solve(n, a, b, dd); }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 136 ms | 12024 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 120 ms | 14652 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 143 ms | 17308 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 122 ms | 19552 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |