Submission #788412

#TimeUsernameProblemLanguageResultExecution timeMemory
788412AndreyMechanical Doll (IOI18_doll)C++14
2 / 100
15 ms3036 KiB
#include "doll.h" #include<bits/stdc++.h> using namespace std; void create_circuit(int m, vector<int> haha) { vector<int> c(m+1); vector<int> x(0); vector<int> y(0); int a = 0; c[0] = haha[0]; for(int i = 0; i < haha.size()-1; i++) { c[haha[i]] = haha[i+1]; } c[haha[haha.size()-1]] = 0; answer(c,x,y); }

Compilation message (stderr)

doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:11:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |     for(int i = 0; i < haha.size()-1; i++) {
      |                    ~~^~~~~~~~~~~~~~~
doll.cpp:9:9: warning: unused variable 'a' [-Wunused-variable]
    9 |     int a = 0;
      |         ^
#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...