# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
974063 | 2024-05-02T17:24:51 Z | Ooops_sorry | 길고양이 (JOI20_stray) | C++14 | 40 ms | 28420 KB |
#ifndef LOCAL #include "Anthony.h" #endif #include<iostream> #include<deque> #include<algorithm> #include<vector> #include<map> #include<random> #include<time.h> #include<cassert> #include<chrono> #include<set> #include<unordered_set> #include<array> using namespace std; #define ull unsigned long long #define pb push_back #define ll long long #define all(a) a.begin(), a.end() #define ld long double mt19937_64 rnd(chrono::high_resolution_clock::now().time_since_epoch().count()); const int N = 2e4 + 10; vector<pair<int, int>> g[N]; vector<int> Mark(int n, int m, int a, int b, vector<int> u, vector<int> v) { for (int i = 0; i < m; i++) { g[u[i]].pb({v[i], i}); g[v[i]].pb({u[i], i}); } if (a == 3) { vector<int> d(n, -1); d[0] = 0; deque<int> q{0}; while (q.size() > 0) { int v = q.front(); q.pop_front(); for (auto [u, i] : g[v]) { if (d[u] == -1) { d[u] = d[v] + 1; q.pb(u); } } } vector<int> ans(m, -1); for (int v = 0; v < n; v++) { for (auto [u, i] : g[v]) { if (d[u] == d[v]) { ans[i] = d[u] % 3; } else { ans[i] = min(d[u], d[v]) % 3; } } } return ans; } }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 40 ms | 28420 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 40 ms | 28420 KB | Execution killed with signal 6 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 26 ms | 13568 KB | Output is correct |
2 | Correct | 1 ms | 1300 KB | Output is correct |
3 | Correct | 22 ms | 13104 KB | Output is correct |
4 | Correct | 36 ms | 15192 KB | Output is correct |
5 | Correct | 33 ms | 15080 KB | Output is correct |
6 | Correct | 36 ms | 13644 KB | Output is correct |
7 | Correct | 31 ms | 13652 KB | Output is correct |
8 | Correct | 31 ms | 14152 KB | Output is correct |
9 | Correct | 30 ms | 14440 KB | Output is correct |
10 | Correct | 27 ms | 14168 KB | Output is correct |
11 | Correct | 27 ms | 14152 KB | Output is correct |
12 | Correct | 30 ms | 14140 KB | Output is correct |
13 | Correct | 27 ms | 14164 KB | Output is correct |
14 | Correct | 35 ms | 14412 KB | Output is correct |
15 | Correct | 31 ms | 14348 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 26 ms | 13568 KB | Output is correct |
2 | Correct | 1 ms | 1300 KB | Output is correct |
3 | Correct | 22 ms | 13104 KB | Output is correct |
4 | Correct | 36 ms | 15192 KB | Output is correct |
5 | Correct | 33 ms | 15080 KB | Output is correct |
6 | Correct | 36 ms | 13644 KB | Output is correct |
7 | Correct | 31 ms | 13652 KB | Output is correct |
8 | Correct | 31 ms | 14152 KB | Output is correct |
9 | Correct | 30 ms | 14440 KB | Output is correct |
10 | Correct | 27 ms | 14168 KB | Output is correct |
11 | Correct | 27 ms | 14152 KB | Output is correct |
12 | Correct | 30 ms | 14140 KB | Output is correct |
13 | Correct | 27 ms | 14164 KB | Output is correct |
14 | Correct | 35 ms | 14412 KB | Output is correct |
15 | Correct | 31 ms | 14348 KB | Output is correct |
16 | Correct | 25 ms | 12064 KB | Output is correct |
17 | Correct | 24 ms | 12076 KB | Output is correct |
18 | Correct | 24 ms | 11864 KB | Output is correct |
19 | Correct | 30 ms | 12020 KB | Output is correct |
20 | Correct | 27 ms | 12636 KB | Output is correct |
21 | Correct | 27 ms | 12428 KB | Output is correct |
22 | Correct | 28 ms | 14284 KB | Output is correct |
23 | Correct | 33 ms | 12004 KB | Output is correct |
24 | Correct | 26 ms | 12112 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 1304 KB | Wrong Answer [2] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 2808 KB | Wrong Answer [2] |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 6 ms | 2788 KB | Wrong Answer [2] |
2 | Halted | 0 ms | 0 KB | - |