Submission #166545

# Submission time Handle Problem Language Result Execution time Memory
166545 2019-12-02T18:07:03 Z rolimans Carnival (CEOI14_carnival) C++14
0 / 100
14 ms 376 KB
#include <bits/stdc++.h>

using namespace std;

const int MAX = 150;

int costumes[MAX];

int n;

int main() {
     ios::sync_with_stdio(false);cin.tie(nullptr),cout.tie(nullptr);

     int aux;

     cin >> n;

     costumes[0] = 1;

     int nat = 2;

     for(int i=0;i<n;i++){
         for(int j=i+1;j<n;j++){
             cout << 2 << " " << i << " " << j << endl;
             cin>> aux;
             if(aux==1){
                 costumes[j] = costumes[i];
             }else if(costumes[j]==0){
                 costumes[j] = nat++;
             }
         }
     }

     cout << 0 << " ";

     for(int i=0;i<n;i++){
         cout << costumes[i];
         if(i!=n-1){
             cout<<" ";
         }else{
             cout<<endl;
         }
     }

     return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 376 KB Integer 0 violates the range [1, 137]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 14 ms 376 KB Integer 0 violates the range [1, 145]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 376 KB Integer 0 violates the range [1, 133]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 11 ms 376 KB Integer 0 violates the range [1, 143]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 12 ms 248 KB Integer 0 violates the range [1, 149]
2 Halted 0 ms 0 KB -