Submission #904916

#TimeUsernameProblemLanguageResultExecution timeMemory
904916dsyzCarnival (CEOI14_carnival)C++17
0 / 100
1 ms344 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; #define MAXN (1000005) int main() { ios_base::sync_with_stdio(false);cin.tie(0); ll N; cin>>N; vector<ll> unique; //exactly 1 representative from all different type of costumes for(ll i = 1;i <= N;i++){ //1-indexed cout<<unique.size() + 1<<" "; for(auto u : unique){ cout<<u<<" "; } cout<<i<<endl; ll diff; cin>>diff; if(diff == unique.size() + 1){ unique.push_back(i); } } cout<<0<<" "; for(ll i = 0;i < N;i++){ cout<<i + 1<<" "; } cout<<endl; }

Compilation message (stderr)

carnival.cpp: In function 'int main()':
carnival.cpp:18:11: warning: comparison of integer expressions of different signedness: 'll' {aka 'long long int'} and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |   if(diff == unique.size() + 1){
      |      ~~~~~^~~~~~~~~~~~~~~~~~~~
#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...