답안 #781395

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
781395 2023-07-13T05:14:29 Z vjudge1 자동 인형 (IOI18_doll) C++17
6 / 100
57 ms 21796 KB
#include "doll.h"
#include<bits/stdc++.h>
using namespace std;
vector<int> X, Y, C;
int ms(int a, int b) {
    X.push_back(a);
    Y.push_back(b);
    return -Y.size();
}
vector<int> adj[500100];
void create_circuit(int M, std::vector<int> A) {
    C.resize(M+1);
    int n = A.size();
    adj[0].push_back(A[0]);
    A.push_back(0);
    for(int i = 0; i < n; i++)
        adj[A[i]].push_back(A[i+1]);
    for(int i = 0; i <= M; i++) {
        
        switch(adj[i].size()) {
            case 1:C[i] = adj[i][0];break;
            case 2:C[i] = ms(adj[i][0], adj[i][1]);break;
            case 3:
            if(adj[i][0]==adj[i][1]&&adj[i][1]==adj[i][2]) {C[i] = adj[i][0]; break;}
            C[i] = ms(ms(adj[i][0], adj[i][2]), adj[i][1]);break;
            case 4:C[i] = ms(ms(adj[i][0], adj[i][2]), ms(adj[i][1], adj[i][3]));break;
        }
    }
    answer(C, X, Y);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 11988 KB Output is correct
2 Correct 25 ms 15768 KB Output is correct
3 Correct 19 ms 15404 KB Output is correct
4 Correct 5 ms 11988 KB Output is correct
5 Correct 13 ms 13212 KB Output is correct
6 Correct 28 ms 17220 KB Output is correct
7 Correct 5 ms 11988 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 11988 KB Output is correct
2 Correct 25 ms 15768 KB Output is correct
3 Correct 19 ms 15404 KB Output is correct
4 Correct 5 ms 11988 KB Output is correct
5 Correct 13 ms 13212 KB Output is correct
6 Correct 28 ms 17220 KB Output is correct
7 Correct 5 ms 11988 KB Output is correct
8 Correct 44 ms 18192 KB Output is correct
9 Correct 42 ms 18584 KB Output is correct
10 Correct 57 ms 21796 KB Output is correct
11 Correct 5 ms 11988 KB Output is correct
12 Correct 5 ms 11988 KB Output is correct
13 Correct 6 ms 11988 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 6 ms 11988 KB Output is correct
2 Correct 25 ms 15768 KB Output is correct
3 Correct 19 ms 15404 KB Output is correct
4 Correct 5 ms 11988 KB Output is correct
5 Correct 13 ms 13212 KB Output is correct
6 Correct 28 ms 17220 KB Output is correct
7 Correct 5 ms 11988 KB Output is correct
8 Correct 44 ms 18192 KB Output is correct
9 Correct 42 ms 18584 KB Output is correct
10 Correct 57 ms 21796 KB Output is correct
11 Correct 5 ms 11988 KB Output is correct
12 Correct 5 ms 11988 KB Output is correct
13 Correct 6 ms 11988 KB Output is correct
14 Incorrect 54 ms 20952 KB state 'Y'
15 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 11988 KB wrong motion
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 11988 KB wrong motion
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 11988 KB wrong motion
2 Halted 0 ms 0 KB -