답안 #95707

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
95707 2019-02-02T07:57:09 Z tqbfjotld 자동 인형 (IOI18_doll) C++14
2 / 100
28 ms 2728 KB
#include "doll.h"
#include <vector>
int ans[100005];
using namespace std;
void create_circuit(int M, std::vector<int> A) {
    vector<int> X;
    vector<int> Y;
    ans[0] = A[0];
    for(int x = 0; x<A.size()-1; x++){
        ans[A[x]]=A[x+1];
    }
    ans[A[A.size()-1]] = 0;
    vector<int> C;
    for (int x = 0; x<M+1; x++){
        C.push_back(ans[x]);
    }
    answer(C, X, Y);
}

Compilation message

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:9:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |     for(int x = 0; x<A.size()-1; x++){
      |                    ~^~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 21 ms 2468 KB Output is correct
3 Correct 17 ms 1828 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 12 ms 1604 KB Output is correct
6 Correct 27 ms 2728 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 21 ms 2468 KB Output is correct
3 Correct 17 ms 1828 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 12 ms 1604 KB Output is correct
6 Correct 27 ms 2728 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Incorrect 28 ms 2340 KB wrong motion
9 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 21 ms 2468 KB Output is correct
3 Correct 17 ms 1828 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 12 ms 1604 KB Output is correct
6 Correct 27 ms 2728 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Incorrect 28 ms 2340 KB wrong motion
9 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB wrong motion
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB wrong motion
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB wrong motion
2 Halted 0 ms 0 KB -