Submission #574803

# Submission time Handle Problem Language Result Execution time Memory
574803 2022-06-09T12:09:37 Z Majid Carnival (CEOI14_carnival) C++17
20 / 100
104 ms 208 KB
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using db = double;
#define pb push_back
#define sz(vec) ((ll)vec.size())
#define all(vec) vec.begin(), vec.end()
#define f first
#define s second
const int MOD = 1e9 + 7;
const ll BIGINF = ((ll)1e18) + 7;
#define Speeed ios::sync_with_stdio(0);cin.tie(NULL); cout.tie(NULL);

int main(){
    
    ll n, col = 1;
    cin>>n;
    
    vector<ll> ans(n+1);
    set<ll> sett;
    
    for(ll i = 1; i <= n; i++){
        
        if(!ans[i]){
            
        ans[i] = col;
        col++;
        }
        
        else continue;
    
    for(ll j = i+1; j <= n; j++){
        
        cout<<"2 "<<i<<" "<<j<<endl;
        ll x;
        cin>>x;
            
        if(x==1)ans[j] = ans[i];
    }
}
    
    
    cout<<"0 ";
    for(ll i = 1; i <= n; i++)cout<<ans[i]<<" ";
    cout<<endl;
    return 0;
    // 1 3 1 
    
}

# Verdict Execution time Memory Grader output
1 Correct 5 ms 208 KB Output is correct
2 Partially correct 17 ms 208 KB Partially correct
3 Partially correct 53 ms 208 KB Partially correct
4 Partially correct 76 ms 208 KB Partially correct
5 Correct 6 ms 208 KB Output is correct
6 Correct 4 ms 208 KB Output is correct
7 Correct 21 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 8 ms 208 KB Output is correct
2 Correct 15 ms 208 KB Output is correct
3 Partially correct 44 ms 208 KB Partially correct
4 Partially correct 83 ms 208 KB Partially correct
5 Correct 11 ms 208 KB Output is correct
6 Correct 5 ms 208 KB Output is correct
7 Correct 18 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 208 KB Output is correct
2 Correct 8 ms 208 KB Output is correct
3 Partially correct 59 ms 208 KB Partially correct
4 Partially correct 83 ms 208 KB Partially correct
5 Correct 17 ms 208 KB Output is correct
6 Correct 11 ms 208 KB Output is correct
7 Partially correct 51 ms 208 KB Partially correct
# Verdict Execution time Memory Grader output
1 Correct 7 ms 208 KB Output is correct
2 Correct 8 ms 208 KB Output is correct
3 Partially correct 82 ms 208 KB Partially correct
4 Partially correct 104 ms 208 KB Partially correct
5 Partially correct 25 ms 208 KB Partially correct
6 Partially correct 61 ms 208 KB Partially correct
7 Partially correct 39 ms 208 KB Partially correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 208 KB Output is correct
2 Correct 9 ms 208 KB Output is correct
3 Partially correct 57 ms 208 KB Partially correct
4 Partially correct 91 ms 208 KB Partially correct
5 Partially correct 56 ms 208 KB Partially correct
6 Partially correct 82 ms 208 KB Partially correct
7 Partially correct 73 ms 208 KB Partially correct