Submission #533647

#TimeUsernameProblemLanguageResultExecution timeMemory
533647devariaotaCarnival (CEOI14_carnival)C++17
68 / 100
44 ms308 KiB
#include <bits/stdc++.h> using namespace std; #define nyahalo ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); #define otsumiko exit(0); #define mikodanye priority_queue<pair<long long, long long>, vector<pair<long long, long long> >, greater<pair<long long, long long> > > #define mikochi priority_queue<long long, vector<long long>, greater<long long> > int main() { nyahalo long long pv = 1, n, cr, tmp; cin >> n; vector<long long> v; long long cl[n+1]; v.push_back(1); cl[1] = 1; for (long long i=2; i<=n; i++) { cout << i; for (long long j=1; j<=i; j++) { cout << " " << j; } cout << "\n"; cout << flush; cin >> cr; if (cr == pv) { for (long long j=0; j<v.size(); j++) { cout << "2 " << v[j] << " " << i << "\n" << flush; cin >> tmp; if (tmp == 1) { cl[i] = j+1; //break; } } } else { v.push_back(i); cl[i] = cr; } pv = cr; } cout << "0"; for (long long i=1; i<=n; i++) { cout << " " << cl[i]; } cout << "\n" << flush; otsumiko }

Compilation message (stderr)

carnival.cpp: In function 'int main()':
carnival.cpp:26:28: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   26 |       for (long long j=0; j<v.size(); j++) {
      |                           ~^~~~~~~~~
#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...