# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
66080 | ikura355 | 007 (CEOI14_007) | C++14 | 534 ms | 18820 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int inf = 1e9;
int n,m,a,b,s1,s2;
vector<int> way[maxn];
int d[2][maxn];
int q[maxn];
int p[maxn], wow[maxn];
int sssp(int k, int u) {
int l = 1, r = 0;
for(int i=1;i<=n;i++) d[k][i] = inf;
d[k][u] = 0; q[++r] = u;
while(l<=r) {
int u = q[l++];
for(auto v : way[u]) {
if(d[k][v] > d[k][u] + 1) {
d[k][v] = d[k][u] + 1; q[++r] = v;
}
}
}
}
bool cmp(int x, int y) {
if(d[0][x]!=d[0][y]) return d[0][x] < d[0][y];
if(d[1][x]!=d[1][y]) return d[1][x] < d[1][y];
return x<y;
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |