This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// P1_Carnival.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <math.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int n; cin >> n;
vector<int> costume(n, -1);
int t = 1;
for (int i = 0; i < n; i++)
{
if (costume[i] != -1) continue;
costume[i] = t;
for (int j = i + 1; j < n; j++)
{
if (costume[j] != -1) continue;
cout << 2 << " " << i << " " << j << endl;
int num; cin >> num;
if (num == 1) costume[j] = t;
}
t++;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |