답안 #601481

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
601481 2022-07-22T05:35:37 Z jack715 자동 인형 (IOI18_doll) C++14
6 / 100
57 ms 7944 KB
#include "doll.h"
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pp pop_back
#define mp make_pair
#define bb back
#define ff first
#define ss second

using namespace std;


void create_circuit(int m, vector<int> a) {
  int ball = 0;
  vector<int> C(m + 1, 0);
  vector<int> X, Y;

  a.push_back(0);
  for (int next : a) {
    if (C[ball] == next) {
      ball = next;
      continue;
    }
    if (C[ball] == 0) {
      C[ball] = next;      
    } else {
      X.push_back(C[ball]);
      Y.push_back(next);
      C[ball] = -X.size();
    }
    ball = next;
  }

  answer(C, X, Y);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 19 ms 2428 KB Output is correct
3 Correct 15 ms 2000 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 8 ms 1452 KB Output is correct
6 Correct 21 ms 2860 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 19 ms 2428 KB Output is correct
3 Correct 15 ms 2000 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 8 ms 1452 KB Output is correct
6 Correct 21 ms 2860 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 34 ms 5024 KB Output is correct
9 Correct 30 ms 4536 KB Output is correct
10 Correct 57 ms 7944 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 19 ms 2428 KB Output is correct
3 Correct 15 ms 2000 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 8 ms 1452 KB Output is correct
6 Correct 21 ms 2860 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 34 ms 5024 KB Output is correct
9 Correct 30 ms 4536 KB Output is correct
10 Correct 57 ms 7944 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 1 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Incorrect 50 ms 7200 KB wrong motion
15 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 -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -