# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
130409 | 2019-07-15T07:00:43 Z | 이온조(#3149) | Information (CEOI08_information) | C++14 | 200 ms | 9672 KB |
#include <bits/stdc++.h> using namespace std; using pii = pair<int, int>; vector<int> A1, A2; vector<pii> adj[2009]; bool v1[2009], v2[2009]; bool chk[1000009]; void dfs(vector<int> &S, bool c[], bool v[], int x) { v[x] = 1; for(auto& it: adj[x]) { if(!c[it.second] && !v[it.first]) { c[it.second] = 1; S.push_back(it.second); dfs(S, c, v, it.first); } } } int main() { int N, M; scanf("%d%d",&N,&M); for(int i=1; i<=M; i++) { int u, v; scanf("%d%d",&u,&v); adj[u].push_back({v, i}); } dfs(A1, chk, v1, 1); dfs(A2, chk, v2, 1); // if((int)A1.size() != N-1 || (int)A2.size() != N-1) return !printf("NONE"); for(auto& it: A1) printf("%d ", it); puts(""); for(auto& it: A2) printf("%d ", it); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 376 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 508 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 376 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 376 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 376 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 20 ms | 1656 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 42 ms | 2524 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 20 ms | 1656 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Incorrect | 2 ms | 376 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 4 ms | 504 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 504 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 193 ms | 9464 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 185 ms | 9280 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 200 ms | 9672 KB | Unexpected end of file - int32 expected |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 4 ms | 504 KB | Unexpected end of file - int32 expected |
2 | Halted | 0 ms | 0 KB | - |