제출 #94979

#제출 시각아이디문제언어결과실행 시간메모리
94979someone_aa자동 인형 (IOI18_doll)C++17
2 / 100
28 ms2220 KiB
#include "doll.h" void create_circuit(int M, std::vector<int> A) { int N = A.size(); std::vector<int> C(M + 1, 0); C[0] = A[0]; for(int i=0;i<A.size()-1;i++) { C[A[i]] = A[i+1]; } C[A.back()] = 0; std::vector<int> X, Y; /*for (int k = 0; k < N; ++k) { X[k] = Y[k] = A[k]; }*/ answer(C, X, Y); }

컴파일 시 표준 에러 (stderr) 메시지

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:7:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    7 |     for(int i=0;i<A.size()-1;i++) {
      |                 ~^~~~~~~~~~~
doll.cpp:4:9: warning: unused variable 'N' [-Wunused-variable]
    4 |     int N = A.size();
      |         ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...