답안 #624290

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
624290 2022-08-07T16:37:17 Z Dan4Life 자동 인형 (IOI18_doll) C++17
2 / 100
31 ms 4548 KB
#include "doll.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
void create_circuit(int M, vector<int> A) {
    A.insert(A.begin(),0); A.push_back(0);
    int n = A.size();
    vector<int> C(M+1), X, Y;
    int cnt[M+1]{0}, ind = 1;
    for(int i = 0; i < n-1; i++){
        cnt[A[i]]++;
        if(cnt[A[i]]==2 and A[i])
            X.pb(A[i]), Y.pb(A[i+1]),C[A[i-1]]=-ind, ind++;
        else C[A[i]]=A[i+1];
    }
    answer(C,X,Y);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 15 ms 2384 KB Output is correct
3 Correct 12 ms 1836 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 9 ms 1876 KB Output is correct
6 Correct 18 ms 2816 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 15 ms 2384 KB Output is correct
3 Correct 12 ms 1836 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 9 ms 1876 KB Output is correct
6 Correct 18 ms 2816 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Incorrect 31 ms 4548 KB wrong motion
9 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 15 ms 2384 KB Output is correct
3 Correct 12 ms 1836 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 9 ms 1876 KB Output is correct
6 Correct 18 ms 2816 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Incorrect 31 ms 4548 KB wrong motion
9 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -