| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 224418 | MKopchev | Highway design (CEOI12_highway) | C++14 | 5 ms | 640 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#include "office.h"
using namespace std;
/*
int GetN()
{
    int ret;
    cin>>ret;
    return ret;
}
bool isOnLine(int x,int y,int z)
{
    cout<<x<<" "<<y<<" "<<z<<endl;
    int ret;
    cin>>ret;
    return ret;
}
void Answer(int a1,int a2,int b1,int b2)
{
    cout<<a1<<" "<<a2<<" "<<b1<<" "<<b2<<endl;
}
*/
int main()
{
	int n=GetN();
	assert(isOnLine(1,2,3)==1);
	int a1=1,a2=2;
	vector<int> b={};
	int i;
	for(i=4;i<=n&&b.size()<2;i=i+2)
    {
        if(i==n)b.push_back(i);
        else
        {
            if(isOnLine(a1,i,i+1)==0)
            {
                if(isOnLine(a1,a2,i)==0)
                {
                    b.push_back(i);
                    if(b.size()==2)break;
                    if(isOnLine(a1,a2,i+1)==0)b.push_back(i+1);
                }
                else b.push_back(i+1);
            }
        }
    }
    Answer(a1,a2,b[0],b[1]);
    return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
