# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
101605 | 2019-03-19T05:05:18 Z | SomeoneUnknown | 섬 항해 (CEOI13_adriatic) | C++14 | 2000 ms | 263168 KB |
#include <bits/stdc++.h> using namespace std; typedef pair<int, int> ii; typedef pair<int, ii> iii; ii mii(int b, int c){ return make_pair(b,c); } int main(){ int n; scanf("%d", &n); ii ilands[n]; int dist[n][n]; for(int i = 0; i < n; i++){ int x, y; scanf("%d %d", &x, &y); ilands[i] = mii(x,y); for(int j = 0; j < i; j++){ if((x > ilands[j].first && y > ilands[j].second) || (x < ilands[j].first && y < ilands[j].second)){ dist[i][j] = dist[j][i] = 1; }else{ dist[i][j] = dist[j][i] = n+5; } } dist[i][i] = 0; } for(int k = 0; k < n; k++) for(int i = 0; i < n; i++) for(int j = 0; j < n; j++) dist[i][j] = min(dist[i][j], dist[i][k] + dist[k][j]); for(int i = 0; i < n; i++){ int tal = 0; for(int j = 0; j < n; j++){ tal += dist[i][j]; } printf("%d\n", tal); } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 384 KB | Output is correct |
2 | Correct | 3 ms | 384 KB | Output is correct |
3 | Correct | 4 ms | 384 KB | Output is correct |
4 | Correct | 4 ms | 384 KB | Output is correct |
5 | Correct | 3 ms | 384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2028 ms | 9188 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Execution timed out | 2047 ms | 98240 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 1200 ms | 263168 KB | Execution killed with signal 9 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 8 ms | 4352 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
2 | Halted | 0 ms | 0 KB | - |