답안 #759322

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
759322 2023-06-16T06:31:21 Z boyliguanhan 길고양이 (JOI20_stray) C++17
4 / 100
331 ms 524288 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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 31 ms 20336 KB Output is correct
2 Correct 2 ms 5256 KB Output is correct
3 Correct 25 ms 19064 KB Output is correct
4 Correct 34 ms 22368 KB Output is correct
5 Correct 41 ms 22328 KB Output is correct
6 Correct 28 ms 19980 KB Output is correct
7 Correct 33 ms 20144 KB Output is correct
8 Correct 34 ms 21504 KB Output is correct
9 Correct 35 ms 21388 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 31 ms 20336 KB Output is correct
2 Correct 2 ms 5256 KB Output is correct
3 Correct 25 ms 19064 KB Output is correct
4 Correct 34 ms 22368 KB Output is correct
5 Correct 41 ms 22328 KB Output is correct
6 Correct 28 ms 19980 KB Output is correct
7 Correct 33 ms 20144 KB Output is correct
8 Correct 34 ms 21504 KB Output is correct
9 Correct 35 ms 21388 KB Output is correct
10 Runtime error 331 ms 524288 KB Execution killed with signal 9
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 18320 KB Output is correct
2 Correct 2 ms 5268 KB Output is correct
3 Correct 24 ms 17272 KB Output is correct
4 Correct 34 ms 20120 KB Output is correct
5 Correct 44 ms 20220 KB Output is correct
6 Correct 59 ms 17884 KB Output is correct
7 Correct 30 ms 17764 KB Output is correct
8 Correct 36 ms 19108 KB Output is correct
9 Correct 33 ms 19072 KB Output is correct
10 Correct 41 ms 18852 KB Output is correct
11 Correct 36 ms 18844 KB Output is correct
12 Correct 39 ms 18844 KB Output is correct
13 Correct 41 ms 18788 KB Output is correct
14 Correct 43 ms 19152 KB Output is correct
15 Correct 41 ms 19152 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 28 ms 18320 KB Output is correct
2 Correct 2 ms 5268 KB Output is correct
3 Correct 24 ms 17272 KB Output is correct
4 Correct 34 ms 20120 KB Output is correct
5 Correct 44 ms 20220 KB Output is correct
6 Correct 59 ms 17884 KB Output is correct
7 Correct 30 ms 17764 KB Output is correct
8 Correct 36 ms 19108 KB Output is correct
9 Correct 33 ms 19072 KB Output is correct
10 Correct 41 ms 18852 KB Output is correct
11 Correct 36 ms 18844 KB Output is correct
12 Correct 39 ms 18844 KB Output is correct
13 Correct 41 ms 18788 KB Output is correct
14 Correct 43 ms 19152 KB Output is correct
15 Correct 41 ms 19152 KB Output is correct
16 Runtime error 280 ms 524288 KB Execution killed with signal 9
17 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 5320 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 9 ms 6988 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 8 ms 6876 KB Wrong Answer [2]
2 Halted 0 ms 0 KB -