Submission #109459

#TimeUsernameProblemLanguageResultExecution timeMemory
109459nikolapesic2802Mechanical Doll (IOI18_doll)C++14
2 / 100
39 ms2232 KiB
#include <bits/stdc++.h> #define ll long long #define pb push_back #define f first #define s second #define all(x) x.begin(), x.end() using namespace std; template<class T1, class T2> ostream& operator<<(ostream& os, const pair<T1,T2>& a) { os << '{' << a.f << ", " << a.s << '}'; return os; } template<class T> ostream& operator<<(ostream& os, const vector<T>& a){os << '{';for(int i=0;i<sz(a);i++){if(i>0&&i<sz(a))os << ", ";os << a[i];}os<<'}';return os;} void answer(std::vector<int> C, std::vector<int> X, std::vector<int> Y); void create_circuit(int M, vector<int> A) { vector<int> sol(M+1),a; sol[0]=A[0]; for(int i=1;i<A.size();i++) sol[A[i-1]]=A[i]; answer(sol,a,a); }

Compilation message (stderr)

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