Submission #759318

# Submission time Handle Problem Language Result Execution time Memory
759318 2023-06-16T06:21:22 Z boyliguanhan Stray Cat (JOI20_stray) C++17
0 / 100
32 ms 20444 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]) {
        return prev = !prev;
    }
    if(!vis){ vis = 1; return 0;}
    else return -1;
}
# Verdict Execution time Memory Grader output
1 Correct 32 ms 20444 KB Output is correct
2 Correct 2 ms 5316 KB Output is correct
3 Incorrect 24 ms 19304 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 32 ms 20444 KB Output is correct
2 Correct 2 ms 5316 KB Output is correct
3 Incorrect 24 ms 19304 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 28 ms 17952 KB Output is correct
2 Correct 3 ms 5260 KB Output is correct
3 Incorrect 27 ms 17232 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 28 ms 17952 KB Output is correct
2 Correct 3 ms 5260 KB Output is correct
3 Incorrect 27 ms 17232 KB Wrong Answer [6]
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 3 ms 5516 KB Output is correct
2 Incorrect 2 ms 5312 KB Wrong Answer [5]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 25 ms 15884 KB Output is correct
2 Incorrect 26 ms 16272 KB Wrong Answer [5]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 15916 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -