Submission #908826

# Submission time Handle Problem Language Result Execution time Memory
908826 2024-01-16T23:41:51 Z vjudge1 Carnival (CEOI14_carnival) C++17
20 / 100
51 ms 344 KB
#include<bits/stdc++.h>
using namespace std;

int n;
int ans[160];

int main(){
    cin >> n; int x; int cont=1;
    for(int i=1; i<=n; i++){
        if(ans[i] == 0){
            ans[i]=cont;
            for(int j=i+1; j<=n; j++){
                if(ans[j]==0){
                    cout << 2 << " " << i << " " << j << endl;
                    x=0;
                    cin >> x;
                    if(x==1)ans[j]=cont;
                }
            }
            cont++;
        }
    }
    cout << 0 << " ";
    for(int i=1; i<=n; i++)cout << ans[i] << " ";
    cout << endl;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 344 KB Output is correct
2 Correct 8 ms 344 KB Output is correct
3 Partially correct 31 ms 344 KB Partially correct
4 Partially correct 34 ms 340 KB Partially correct
5 Correct 1 ms 344 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 6 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 344 KB Output is correct
2 Correct 9 ms 344 KB Output is correct
3 Partially correct 16 ms 344 KB Partially correct
4 Partially correct 51 ms 344 KB Partially correct
5 Correct 2 ms 344 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 3 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 3 ms 344 KB Output is correct
3 Partially correct 17 ms 344 KB Partially correct
4 Partially correct 48 ms 344 KB Partially correct
5 Correct 4 ms 344 KB Output is correct
6 Correct 6 ms 344 KB Output is correct
7 Correct 15 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 344 KB Output is correct
2 Correct 2 ms 344 KB Output is correct
3 Partially correct 30 ms 344 KB Partially correct
4 Partially correct 41 ms 344 KB Partially correct
5 Correct 6 ms 344 KB Output is correct
6 Correct 13 ms 344 KB Output is correct
7 Correct 9 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 5 ms 344 KB Output is correct
3 Partially correct 24 ms 344 KB Partially correct
4 Partially correct 25 ms 344 KB Partially correct
5 Correct 11 ms 344 KB Output is correct
6 Partially correct 21 ms 344 KB Partially correct
7 Partially correct 48 ms 344 KB Partially correct