제출 #534466

#제출 시각아이디문제언어결과실행 시간메모리
534466YaserFaisal사육제 (CEOI14_carnival)C++17
20 / 100
104 ms200 KiB
#include <bits/stdc++.h> 
 
using namespace std ;
 
#define int long long
#define X first 
#define Y second
#define F first 
#define S second
//#define endl "\n"
#define pii pair < int , int >

int ans[155] ;

int32_t main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n ; cin >> n ;
  int c = 0 ;
  for ( int i = 1 ; i <= n ; i++ )
  {
    if ( ans[i] != 0 ) continue ;
    else { c++ ; ans[i] = c ; }
    for ( int j = i+1 ; j <= n ; j++ )
    {
      cout << 2 << " " << i << " " << j << endl ;
      int x ; cin >> x ;
      if ( x == 1 ) ans[j] = c ;
    }
  }
  for ( int i = 0 ; i <= n ; i++ ) cout << ans[i] << " " ;
  cout << endl ;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...