Submission #166546

# Submission time Handle Problem Language Result Execution time Memory
166546 2019-12-02T18:10:03 Z rolimans Carnival (CEOI14_carnival) C++14
0 / 100
109 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[1] = 1;

     int nat = 2;

     for(int i=1;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=1;i<=n;i++){
         cout << costumes[i];
         if(i!=n){
             cout<<" ";
         }else{
             cout<<endl;
         }
     }

     return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 100 ms 252 KB Integer 17 violates the range [1, 11]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 95 ms 376 KB Integer 6 violates the range [1, 5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 85 ms 376 KB Partially correct
2 Incorrect 90 ms 376 KB Integer 10 violates the range [1, 8]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 90 ms 248 KB Partially correct
2 Incorrect 109 ms 252 KB Integer 8 violates the range [1, 6]
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Partially correct 97 ms 376 KB Partially correct
2 Incorrect 51 ms 248 KB Integer 20 violates the range [1, 17]
3 Halted 0 ms 0 KB -