Submission #166549

# Submission time Handle Problem Language Result Execution time Memory
166549 2019-12-02T19:14:04 Z rolimans Carnival (CEOI14_carnival) C++14
20 / 100
112 ms 380 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;

    int nat = 1;

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

    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 Correct 9 ms 376 KB Output is correct
2 Partially correct 18 ms 248 KB Partially correct
3 Partially correct 74 ms 376 KB Partially correct
4 Partially correct 80 ms 248 KB Partially correct
5 Correct 4 ms 248 KB Output is correct
6 Correct 5 ms 380 KB Output is correct
7 Correct 18 ms 248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 10 ms 376 KB Output is correct
2 Correct 32 ms 248 KB Output is correct
3 Partially correct 51 ms 248 KB Partially correct
4 Partially correct 45 ms 248 KB Partially correct
5 Correct 12 ms 376 KB Output is correct
6 Correct 18 ms 248 KB Output is correct
7 Correct 16 ms 248 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 376 KB Output is correct
2 Correct 10 ms 376 KB Output is correct
3 Partially correct 46 ms 376 KB Partially correct
4 Partially correct 77 ms 376 KB Partially correct
5 Correct 24 ms 248 KB Output is correct
6 Correct 32 ms 376 KB Output is correct
7 Partially correct 37 ms 376 KB Partially correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 248 KB Output is correct
2 Correct 12 ms 376 KB Output is correct
3 Partially correct 84 ms 248 KB Partially correct
4 Partially correct 81 ms 248 KB Partially correct
5 Partially correct 33 ms 376 KB Partially correct
6 Partially correct 63 ms 248 KB Partially correct
7 Partially correct 40 ms 248 KB Partially correct
# Verdict Execution time Memory Grader output
1 Correct 4 ms 248 KB Output is correct
2 Correct 33 ms 248 KB Output is correct
3 Partially correct 79 ms 376 KB Partially correct
4 Partially correct 66 ms 376 KB Partially correct
5 Partially correct 57 ms 248 KB Partially correct
6 Partially correct 47 ms 248 KB Partially correct
7 Partially correct 112 ms 376 KB Partially correct