# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1064830 | 2024-08-18T18:17:58 Z | Osplei | 기지국 (IOI20_stations) | C++17 | 1479 ms | 2728 KB |
#include "stations.h" #include <bits/stdc++.h> using namespace std; #define pb push_back bool bfs (int nodo, int obj, int parte){ bool visto[1000005]; queue <int> q; for (int i = 0; i < 1000005; i++) visto[i] = false; q.push(nodo); while (!q.empty()){ int act = q.front(); q.pop(); if (act == parte) continue; if (act == obj) return true; if (act > 1000) continue; if (visto[act] == true) continue; visto[act] = true; if (act != 0) q.push((act - 1) / 2); q.push((act * 2) + 1); q.push((act * 2) + 2); } return false; } vector <int> label(int n, int k, vector <int> u, vector <int> v) { for (int i = 0; i < u.size(); i++) { int a = u[i], b = v[i]; } vector <int> labels; for (int i = 0; i < n; i++) labels.pb(i); return labels; } int find_next_station(int s, int t, vector <int> c) { if (c.size() == 1) return c[0]; for (int i = 0; i < c.size(); i++) { if (bfs(c[i], t, s) == true) return c[i]; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 427 ms | 2728 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1062 ms | 1708 KB | Output is correct |
2 | Correct | 1083 ms | 1708 KB | Output is correct |
3 | Correct | 570 ms | 688 KB | Output is correct |
4 | Correct | 1404 ms | 1712 KB | Output is correct |
5 | Correct | 1479 ms | 1708 KB | Output is correct |
6 | Correct | 1027 ms | 1708 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 501 ms | 2724 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 572 ms | 684 KB | Output is correct |
2 | Incorrect | 1153 ms | 1960 KB | Wrong query response. |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 414 ms | 2724 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |