# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
260861 |
2020-08-11T06:14:26 Z |
송준혁(#5049) |
길고양이 (JOI20_stray) |
C++17 |
|
70 ms |
16864 KB |
#include "Anthony.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
std::vector<int> adj[20202];
int D[20202];
bool chk[20202];
queue<int> Q;
}
std::vector<int> Mark(int N, int M, int A, int B, std::vector<int> U, std::vector<int> V) {
std::vector<int> X(M);
for (int i=0; i<M; i++){
adj[U[i]].push_back(V[i]);
adj[V[i]].push_back(U[i]);
}
Q.push(0), chk[0]=true;
while (Q.size()){
int u = Q.front();
Q.pop();
for (int v : adj[u]) if (!chk[v]){
chk[v]=true, D[v]=D[u]+1;
Q.push(v);
}
}
for (int i=0; i<M; i++){
int u=U[i], v=V[i];
if (D[u] < D[v]) X[i] = D[v] % 3;
else if (D[u] > D[v]) X[i] = D[u] % 3;
else X[i] = (D[v]+1) % 3;
}
return X;
}
#include "Catherine.h"
#include <vector>
void Init(int A, int B) {
}
int Move(std::vector<int> y) {
if (y[0] && y[1]) return 0;
if (y[1] && y[2]) return 1;
if (y[0] && y[2]) return 2;
if (y[0]) return 0;
if (y[1]) return 1;
if (y[2]) return 2;
}
Compilation message
Catherine.cpp: In function 'int Move(std::vector<int>)':
Catherine.cpp:15:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
57 ms |
15680 KB |
Output is correct |
2 |
Correct |
1 ms |
1536 KB |
Output is correct |
3 |
Correct |
45 ms |
14832 KB |
Output is correct |
4 |
Correct |
68 ms |
16844 KB |
Output is correct |
5 |
Correct |
65 ms |
16864 KB |
Output is correct |
6 |
Correct |
49 ms |
15516 KB |
Output is correct |
7 |
Correct |
48 ms |
15416 KB |
Output is correct |
8 |
Correct |
62 ms |
16196 KB |
Output is correct |
9 |
Correct |
56 ms |
16204 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
57 ms |
15680 KB |
Output is correct |
2 |
Correct |
1 ms |
1536 KB |
Output is correct |
3 |
Correct |
45 ms |
14832 KB |
Output is correct |
4 |
Correct |
68 ms |
16844 KB |
Output is correct |
5 |
Correct |
65 ms |
16864 KB |
Output is correct |
6 |
Correct |
49 ms |
15516 KB |
Output is correct |
7 |
Correct |
48 ms |
15416 KB |
Output is correct |
8 |
Correct |
62 ms |
16196 KB |
Output is correct |
9 |
Correct |
56 ms |
16204 KB |
Output is correct |
10 |
Correct |
43 ms |
13456 KB |
Output is correct |
11 |
Correct |
44 ms |
13444 KB |
Output is correct |
12 |
Correct |
43 ms |
13432 KB |
Output is correct |
13 |
Correct |
43 ms |
13432 KB |
Output is correct |
14 |
Correct |
45 ms |
13876 KB |
Output is correct |
15 |
Correct |
52 ms |
14120 KB |
Output is correct |
16 |
Correct |
57 ms |
16244 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
47 ms |
13248 KB |
Output is correct |
2 |
Correct |
1 ms |
1536 KB |
Output is correct |
3 |
Correct |
38 ms |
12868 KB |
Output is correct |
4 |
Correct |
59 ms |
14540 KB |
Output is correct |
5 |
Correct |
70 ms |
14660 KB |
Output is correct |
6 |
Correct |
47 ms |
13176 KB |
Output is correct |
7 |
Correct |
47 ms |
13232 KB |
Output is correct |
8 |
Correct |
53 ms |
13820 KB |
Output is correct |
9 |
Correct |
56 ms |
13908 KB |
Output is correct |
10 |
Correct |
53 ms |
13564 KB |
Output is correct |
11 |
Correct |
56 ms |
13820 KB |
Output is correct |
12 |
Correct |
51 ms |
13768 KB |
Output is correct |
13 |
Correct |
51 ms |
13764 KB |
Output is correct |
14 |
Correct |
63 ms |
13848 KB |
Output is correct |
15 |
Correct |
57 ms |
14012 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
47 ms |
13248 KB |
Output is correct |
2 |
Correct |
1 ms |
1536 KB |
Output is correct |
3 |
Correct |
38 ms |
12868 KB |
Output is correct |
4 |
Correct |
59 ms |
14540 KB |
Output is correct |
5 |
Correct |
70 ms |
14660 KB |
Output is correct |
6 |
Correct |
47 ms |
13176 KB |
Output is correct |
7 |
Correct |
47 ms |
13232 KB |
Output is correct |
8 |
Correct |
53 ms |
13820 KB |
Output is correct |
9 |
Correct |
56 ms |
13908 KB |
Output is correct |
10 |
Correct |
53 ms |
13564 KB |
Output is correct |
11 |
Correct |
56 ms |
13820 KB |
Output is correct |
12 |
Correct |
51 ms |
13768 KB |
Output is correct |
13 |
Correct |
51 ms |
13764 KB |
Output is correct |
14 |
Correct |
63 ms |
13848 KB |
Output is correct |
15 |
Correct |
57 ms |
14012 KB |
Output is correct |
16 |
Correct |
41 ms |
11728 KB |
Output is correct |
17 |
Correct |
42 ms |
11592 KB |
Output is correct |
18 |
Correct |
50 ms |
11564 KB |
Output is correct |
19 |
Correct |
44 ms |
11548 KB |
Output is correct |
20 |
Correct |
52 ms |
12144 KB |
Output is correct |
21 |
Correct |
46 ms |
11896 KB |
Output is correct |
22 |
Correct |
53 ms |
13948 KB |
Output is correct |
23 |
Correct |
43 ms |
11640 KB |
Output is correct |
24 |
Correct |
43 ms |
11672 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
1536 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
10 ms |
3904 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
11 ms |
3840 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |