Submission #759319

# Submission time Handle Problem Language Result Execution time Memory
759319 2023-06-16T06:23:01 Z boyliguanhan Stray Cat (JOI20_stray) C++17
5 / 100
41 ms 19812 KB
#include "Anthony.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> X;
vector<pair<int, int>> adj[200100];
void dfs(int n, int p, int x) {
    for(auto i: adj[n])
        if(i.first!=p)
            X[i.second] = x, dfs(i.first, n, !x);
}
std::vector<int> Mark(int N, int M, int A, int B, std::vector<int> U, std::vector<int> V) {
    X.resize(M);
    for(int i = 0; i < M; i++)
        adj[U[i]].push_back({V[i], i}), adj[V[i]].push_back({U[i], i});
    dfs(0,N,0);
    return X;
}
#include "Catherine.h"
#include <vector>

int a, b, prev, vis;
void Init(int A, int B) {
    a = A;
    b = B;
}

int Move(std::vector<int> y) {
    if(y[!prev]) {
        vis = 1;
        return prev = !prev;
    }
    if(!vis){ vis = 1; return (bool)y[1];}
    else return -1;
}
# Verdict Execution time Memory Grader output
1 Correct 33 ms 19812 KB Output is correct
2 Correct 3 ms 5264 KB Output is correct
3 Incorrect 23 ms 19032 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 33 ms 19812 KB Output is correct
2 Correct 3 ms 5264 KB Output is correct
3 Incorrect 23 ms 19032 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 29 ms 17504 KB Output is correct
2 Correct 2 ms 5256 KB Output is correct
3 Incorrect 24 ms 16756 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 29 ms 17504 KB Output is correct
2 Correct 2 ms 5256 KB Output is correct
3 Incorrect 24 ms 16756 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 5516 KB Output is correct
2 Correct 2 ms 5264 KB Output is correct
3 Correct 2 ms 5528 KB Output is correct
4 Correct 3 ms 5584 KB Output is correct
5 Correct 2 ms 5576 KB Output is correct
6 Correct 5 ms 5680 KB Output is correct
7 Correct 4 ms 5560 KB Output is correct
8 Correct 3 ms 5572 KB Output is correct
9 Correct 3 ms 5572 KB Output is correct
10 Correct 4 ms 5520 KB Output is correct
11 Correct 5 ms 5528 KB Output is correct
12 Correct 4 ms 5520 KB Output is correct
13 Correct 4 ms 5520 KB Output is correct
14 Correct 4 ms 5520 KB Output is correct
15 Correct 2 ms 5528 KB Output is correct
16 Correct 3 ms 5584 KB Output is correct
17 Correct 4 ms 5536 KB Output is correct
18 Correct 3 ms 5520 KB Output is correct
19 Correct 5 ms 5788 KB Output is correct
20 Correct 4 ms 5548 KB Output is correct
21 Correct 4 ms 5484 KB Output is correct
22 Correct 3 ms 5532 KB Output is correct
23 Correct 4 ms 5572 KB Output is correct
24 Correct 4 ms 5624 KB Output is correct
25 Correct 3 ms 5576 KB Output is correct
26 Correct 4 ms 5528 KB Output is correct
27 Correct 4 ms 5616 KB Output is correct
28 Correct 5 ms 5592 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 26 ms 15256 KB Output is correct
2 Correct 28 ms 16200 KB Output is correct
3 Correct 3 ms 5256 KB Output is correct
4 Correct 23 ms 15692 KB Output is correct
5 Correct 41 ms 17924 KB Output is correct
6 Correct 40 ms 17764 KB Output is correct
7 Incorrect 26 ms 16968 KB Wrong Answer [6]
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 26 ms 15528 KB Output is correct
2 Correct 35 ms 16532 KB Output is correct
3 Correct 3 ms 5396 KB Output is correct
4 Correct 27 ms 15532 KB Output is correct
5 Correct 32 ms 17868 KB Output is correct
6 Correct 36 ms 17960 KB Output is correct
7 Incorrect 26 ms 16944 KB Wrong Answer [6]
8 Halted 0 ms 0 KB -