Submission #94979

#TimeUsernameProblemLanguageResultExecution timeMemory
94979someone_aaMechanical Doll (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); }

Compilation message (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...