#include "Anthony.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int FunctionExample(int i, int A) {
return i % A;
}
const int INF=1e9;
} // namespace
vector<int> Mark(int N, int M, int A, int B,vector<int> U, vector<int> V) {
vector<int> v(M,3),adj[N+1];
queue<int> q;
vector<int> dis(N+1,INF);
for(int i=0;i<M;i++){
adj[U[i]].push_back(i);
adj[V[i]].push_back(i);
}
q.push(0);
dis[0]=0;
while(q.size()){
int p=q.front();
q.pop();
for(int i:adj[p]){
int j=(U[i]==p?V[i]:U[i]);
if(dis[j]==INF){
dis[j]=dis[p]+1;
v[i]=dis[p]%3;
q.push(j);
}
}
}
return v;
}
#include "Catherine.h"
#include <bits/stdc++.h>
using namespace std;
namespace {
int A, B;
int variable_example = 0;
} // namespace
void Init(int A, int B) {
::A = A;
::B = B;
}
int Move(vector<int> y) {
if(y[0]==0&&y[1]==0)return 2;
if(y[1]==0&&y[2]==0)return 0;
if(y[2]==0&&y[0]==0)return 1;
if(y[0]&&y[1])return 0;
if(y[1]&&y[2])return 1;
if(y[2]&&y[0])return 2;
}
Compilation message
Anthony.cpp:7:5: warning: 'int {anonymous}::FunctionExample(int, int)' defined but not used [-Wunused-function]
7 | int FunctionExample(int i, int A) {
| ^~~~~~~~~~~~~~~
Catherine.cpp: In function 'int Move(std::vector<int>)':
Catherine.cpp:23:1: warning: control reaches end of non-void function [-Wreturn-type]
23 | }
| ^
Catherine.cpp: At global scope:
Catherine.cpp:7:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
7 | int variable_example = 0;
| ^~~~~~~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
15912 KB |
Output is correct |
2 |
Correct |
0 ms |
784 KB |
Output is correct |
3 |
Correct |
24 ms |
15408 KB |
Output is correct |
4 |
Correct |
34 ms |
16908 KB |
Output is correct |
5 |
Correct |
37 ms |
17124 KB |
Output is correct |
6 |
Correct |
27 ms |
15844 KB |
Output is correct |
7 |
Correct |
31 ms |
15876 KB |
Output is correct |
8 |
Correct |
34 ms |
16424 KB |
Output is correct |
9 |
Correct |
33 ms |
16432 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
33 ms |
15912 KB |
Output is correct |
2 |
Correct |
0 ms |
784 KB |
Output is correct |
3 |
Correct |
24 ms |
15408 KB |
Output is correct |
4 |
Correct |
34 ms |
16908 KB |
Output is correct |
5 |
Correct |
37 ms |
17124 KB |
Output is correct |
6 |
Correct |
27 ms |
15844 KB |
Output is correct |
7 |
Correct |
31 ms |
15876 KB |
Output is correct |
8 |
Correct |
34 ms |
16424 KB |
Output is correct |
9 |
Correct |
33 ms |
16432 KB |
Output is correct |
10 |
Correct |
26 ms |
13872 KB |
Output is correct |
11 |
Correct |
29 ms |
13884 KB |
Output is correct |
12 |
Correct |
25 ms |
14012 KB |
Output is correct |
13 |
Correct |
26 ms |
14048 KB |
Output is correct |
14 |
Correct |
26 ms |
13900 KB |
Output is correct |
15 |
Correct |
28 ms |
14264 KB |
Output is correct |
16 |
Correct |
32 ms |
16432 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
32 ms |
13380 KB |
Output is correct |
2 |
Correct |
1 ms |
1048 KB |
Output is correct |
3 |
Correct |
23 ms |
13244 KB |
Output is correct |
4 |
Correct |
33 ms |
14852 KB |
Output is correct |
5 |
Correct |
33 ms |
14736 KB |
Output is correct |
6 |
Correct |
28 ms |
13408 KB |
Output is correct |
7 |
Correct |
26 ms |
13396 KB |
Output is correct |
8 |
Correct |
28 ms |
14136 KB |
Output is correct |
9 |
Correct |
30 ms |
14148 KB |
Output is correct |
10 |
Correct |
31 ms |
13872 KB |
Output is correct |
11 |
Correct |
33 ms |
13848 KB |
Output is correct |
12 |
Correct |
32 ms |
14068 KB |
Output is correct |
13 |
Correct |
30 ms |
13888 KB |
Output is correct |
14 |
Correct |
31 ms |
14040 KB |
Output is correct |
15 |
Correct |
31 ms |
14152 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
32 ms |
13380 KB |
Output is correct |
2 |
Correct |
1 ms |
1048 KB |
Output is correct |
3 |
Correct |
23 ms |
13244 KB |
Output is correct |
4 |
Correct |
33 ms |
14852 KB |
Output is correct |
5 |
Correct |
33 ms |
14736 KB |
Output is correct |
6 |
Correct |
28 ms |
13408 KB |
Output is correct |
7 |
Correct |
26 ms |
13396 KB |
Output is correct |
8 |
Correct |
28 ms |
14136 KB |
Output is correct |
9 |
Correct |
30 ms |
14148 KB |
Output is correct |
10 |
Correct |
31 ms |
13872 KB |
Output is correct |
11 |
Correct |
33 ms |
13848 KB |
Output is correct |
12 |
Correct |
32 ms |
14068 KB |
Output is correct |
13 |
Correct |
30 ms |
13888 KB |
Output is correct |
14 |
Correct |
31 ms |
14040 KB |
Output is correct |
15 |
Correct |
31 ms |
14152 KB |
Output is correct |
16 |
Incorrect |
6 ms |
2788 KB |
Wrong Answer [2] |
17 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
1048 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
2784 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
2804 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |