Submission #759321

# Submission time Handle Problem Language Result Execution time Memory
759321 2023-06-16T06:29:38 Z boyliguanhan Stray Cat (JOI20_stray) C++17
0 / 100
28 ms 20080 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+1)%3);
}
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) {
    int cnt = 0;
    if(!y[0]) cnt++;
    if(!y[1]) cnt++;
    if(!y[2]) cnt++;
    if(cnt==1) {
        if(y[0]) return 0;
        if(y[1]) return 1;
        if(y[2]) return 2;
    }
    if(!y[0]) return 1;
    else if(!y[1]) return 2;
    else return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 20080 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 20080 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 17888 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 17888 KB Wrong Answer [5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 5328 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 6540 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 6496 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -