Submission #257131

# Submission time Handle Problem Language Result Execution time Memory
257131 2020-08-03T15:58:46 Z a_player Carnival (CEOI14_carnival) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>

using namespace std;
const int nax=150+5;
int col[nax];

int main(){
    int N;
    cin>>N;
    for(int i=0;i<N;i++){
        if(|col[i])col[i]=i+1;
        for(int j=i+1;j<N;j++){
            cout<<"2 "<<i<<" "<<j<<endl;
            int h;
            cin>>h;
            if(h==1&&!col[j])col[j]=i+1;
        }
    }
    cout<<"0 ";
    for(int i=0;i<N;i++)cout<<col[i]<<" ";

}

Compilation message

carnival.cpp: In function 'int main()':
carnival.cpp:11:12: error: expected primary-expression before '|' token
         if(|col[i])col[i]=i+1;
            ^