# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
251805 | 2020-07-22T10:27:51 Z | imeimi2000 | Stray Cat (JOI20_stray) | C++17 | 3000 ms | 2048 KB |
#include "Anthony.h" #include <bits/stdc++.h> using namespace std; vector<int> Mark(int n, int m, int A, int B, vector<int> U, vector<int> V) { if (A > 2) { vector<int> dist(n, -1); vector<vector<int>> edge(n); for (int i = 0; i < m; ++i) { edge[U[i]].push_back(V[i]); edge[V[i]].push_back(U[i]); } queue<int> q; q.push(0); dist[0] = 0; while (!q.empty()) { int x = q.front(); for (int i : edge[x]) { if (dist[i] != -1) continue; q.push(i); dist[i] = dist[x] + 1; } } vector<int> ret(m); for (int i = 0; i < m; ++i) { int u = U[i], v = V[i]; if (dist[u] > dist[v]) swap(u, v); ret[i] = dist[u] % 3; } return ret; } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3072 ms | 2048 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3072 ms | 2048 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3087 ms | 2048 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Execution timed out | 3087 ms | 2048 KB | Time limit exceeded |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 648 KB | Wrong Answer [1] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 1536 KB | Wrong Answer [1] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 8 ms | 1520 KB | Wrong Answer [1] |
2 | Halted | 0 ms | 0 KB | - |