Submission #282515

#TimeUsernameProblemLanguageResultExecution timeMemory
282515Haunted_CppMechanical Doll (IOI18_doll)C++17
2 / 100
29 ms2224 KiB
#include "doll.h" #include <bits/stdc++.h> using namespace std; void create_circuit(int M, vector<int> A) { int N = A.size(); vector<int> C(M + 1, -1); C[0] = A[0]; for (int i = 0; i < (int) A.size() - 1; i++) { C[A[i]]= A[i + 1]; } C[A.back()] = 0; for (int i = 0; i <= M + 1; i++) if (C[i] == -1) C[i] = i; vector<int> X, Y; answer(C, X, Y); }

Compilation message (stderr)

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:6:7: warning: unused variable 'N' [-Wunused-variable]
    6 |   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...