# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17376 | eaststar | Highway design (CEOI12_highway) | C++14 | 0 ms | 1508 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 "office.h"
int main(){
int N=GetN();
int i,j,k,a,b,c,x=0,y=0;
for(i=1;i<5;++i){
for(j=i+1;j<6;++j){
for(k=j+1;k<7;++k)if(isOnLine(i,j,k))break;
if(k<7)break;
}
if(j<6)break;
}
a=i,b=j,c=k;
for(i=1;i<7&&!y;++i)if(i!=a&&i!=b&&i!=c&&!isOnLine(a,b,i)){
if(x){
y=i;
break;
}
else x=i;
}
if(!y){
if(!x){
for(i=7;i<N;i+=2)if(!isOnLine(a,i,i+1))break;
if(isOnLine(a,b,i))x=i+1;
else x=i;
}
for(;i<N;i+=2)if(!isOnLine(a,i,i+1))break;
if(isOnLine(a,b,i))y=i+1;
else y=i;
}
Answer(a,b,x,y);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |