Submission #574746

# Submission time Handle Problem Language Result Execution time Memory
574746 2022-06-09T11:36:59 Z m_fenais Carnival (CEOI14_carnival) C++14
0 / 100
99 ms 312 KB
#include <bits/stdc++.h>
//#define endl '\n'
#define mk make_pair
#define FAST ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
typedef long long ll;
using namespace std;

const int N = 1e6 + 10;
const int mod = 1e9 + 7;
map<int, int> mp;

int main()
{
   FAST;
   int n;
   cin>>n;
   for(int i=1; i<=n; i++)
    mp[i] = i;
   for(int i=1; i<=n; i++)
   {
     for(int j=1; j<=n; j++)
     {
       if(i != j){
        cout<<2<<' '<<i<<' '<<j<<endl;
        int x;
        cin>>x;
        if(x == 1)
        {
          mp[j] = i;
        }
      }
     }
   }
   cout<<0<<' ';
   for(int i=1; i<n; i++)
   {
     cout<<mp[i]<<' ';
   }
   cout<<endl;
   return 0;
}
# Verdict Execution time Memory Grader output
1 Runtime error 94 ms 312 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 99 ms 300 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 91 ms 308 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 93 ms 300 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 90 ms 308 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -