#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);
}
else if(dis[j]==dis[p]+1){
v[i]=dis[p]%3;
}
}
}
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 |
28 ms |
15480 KB |
Output is correct |
2 |
Correct |
0 ms |
792 KB |
Output is correct |
3 |
Correct |
23 ms |
14972 KB |
Output is correct |
4 |
Correct |
35 ms |
16460 KB |
Output is correct |
5 |
Correct |
35 ms |
16508 KB |
Output is correct |
6 |
Correct |
38 ms |
15520 KB |
Output is correct |
7 |
Correct |
27 ms |
15220 KB |
Output is correct |
8 |
Correct |
32 ms |
15992 KB |
Output is correct |
9 |
Correct |
39 ms |
15920 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
28 ms |
15480 KB |
Output is correct |
2 |
Correct |
0 ms |
792 KB |
Output is correct |
3 |
Correct |
23 ms |
14972 KB |
Output is correct |
4 |
Correct |
35 ms |
16460 KB |
Output is correct |
5 |
Correct |
35 ms |
16508 KB |
Output is correct |
6 |
Correct |
38 ms |
15520 KB |
Output is correct |
7 |
Correct |
27 ms |
15220 KB |
Output is correct |
8 |
Correct |
32 ms |
15992 KB |
Output is correct |
9 |
Correct |
39 ms |
15920 KB |
Output is correct |
10 |
Correct |
26 ms |
13408 KB |
Output is correct |
11 |
Correct |
27 ms |
13424 KB |
Output is correct |
12 |
Correct |
28 ms |
13384 KB |
Output is correct |
13 |
Correct |
26 ms |
13420 KB |
Output is correct |
14 |
Correct |
30 ms |
13832 KB |
Output is correct |
15 |
Correct |
30 ms |
14196 KB |
Output is correct |
16 |
Correct |
30 ms |
15992 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
12964 KB |
Output is correct |
2 |
Correct |
0 ms |
788 KB |
Output is correct |
3 |
Correct |
22 ms |
12664 KB |
Output is correct |
4 |
Correct |
34 ms |
14296 KB |
Output is correct |
5 |
Correct |
33 ms |
14452 KB |
Output is correct |
6 |
Correct |
27 ms |
12920 KB |
Output is correct |
7 |
Correct |
27 ms |
13168 KB |
Output is correct |
8 |
Correct |
35 ms |
13684 KB |
Output is correct |
9 |
Correct |
30 ms |
13680 KB |
Output is correct |
10 |
Correct |
30 ms |
13440 KB |
Output is correct |
11 |
Correct |
28 ms |
13428 KB |
Output is correct |
12 |
Correct |
32 ms |
13440 KB |
Output is correct |
13 |
Correct |
28 ms |
13520 KB |
Output is correct |
14 |
Correct |
30 ms |
13756 KB |
Output is correct |
15 |
Correct |
32 ms |
13684 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
27 ms |
12964 KB |
Output is correct |
2 |
Correct |
0 ms |
788 KB |
Output is correct |
3 |
Correct |
22 ms |
12664 KB |
Output is correct |
4 |
Correct |
34 ms |
14296 KB |
Output is correct |
5 |
Correct |
33 ms |
14452 KB |
Output is correct |
6 |
Correct |
27 ms |
12920 KB |
Output is correct |
7 |
Correct |
27 ms |
13168 KB |
Output is correct |
8 |
Correct |
35 ms |
13684 KB |
Output is correct |
9 |
Correct |
30 ms |
13680 KB |
Output is correct |
10 |
Correct |
30 ms |
13440 KB |
Output is correct |
11 |
Correct |
28 ms |
13428 KB |
Output is correct |
12 |
Correct |
32 ms |
13440 KB |
Output is correct |
13 |
Correct |
28 ms |
13520 KB |
Output is correct |
14 |
Correct |
30 ms |
13756 KB |
Output is correct |
15 |
Correct |
32 ms |
13684 KB |
Output is correct |
16 |
Incorrect |
6 ms |
2328 KB |
Wrong Answer [2] |
17 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
796 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
2332 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
6 ms |
2320 KB |
Wrong Answer [2] |
2 |
Halted |
0 ms |
0 KB |
- |