# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
125290 | figter001 | Highway design (CEOI12_highway) | C++17 | 3 ms | 760 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>
using namespace std;
//#define TEST
#ifndef TEST
#include "office.h"
#endif // TEST
#ifdef TEST
int GetN(){
return 14;
}
int isOnLine(int a, int b, int c){
int ans = 0;
printf("asked %d %d %d\n", a, b, c);
scanf("%d", &ans);
return ans;
}
void Answer(int a1, int b1, int a2, int b2){
printf("Answered %d %d %d %d\n", a1, b1, a2, b2);
}
#endif
bool vis[11][11][11];
int main(){
int n = GetN();
vector<int> a = {1,2,3,4,5};
do{
vector<int> cur;
cur.push_back(a[0]);
cur.push_back(a[1]);
cur.push_back(a[2]);
sort(cur.begin(),cur.end());
int x = cur[0],y = cur[1],z = cur[2];
// if(vis[x][y][z])continue;
// vis[x][y][z] = 1;
int res = isOnLine(x,y,z);
if(res == 1){
Answer(x,y,cur[3],cur[4]);
break;
}
}while(next_permutation(a.begin(),a.end()));
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |