# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
311814 | mohamedsobhi777 | 고속도로 설계 (CEOI12_highway) | C++14 | 2 ms | 1660 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;
vector<int> line1 , line2 ;
void finish(){
Answer(line1[0],line1[1],line2[0] , line2[1]) ;
exit(0) ;
}
int st ;
int main(){
int n = GetN() ;
bool x1 = isOnLine(1 , 2 , 3) ;
if(x1){
line1 = {1 , 2 , 3} ;
st = 4;
}else{
st = 5 ;
if(isOnLine(4 , 1 , 2)){
line1 = {1 , 2 , 4} ;
line2 = {3} ;
}
else if(isOnLine(4 , 1 , 3)){
line1 = {4 , 1 , 3} ;
line2 = {2} ;
}else{
line1 = {2 , 3, 4} ;
line2 = {1} ;
}
}
for(int i = st ; i < n; i += 2){
if(!isOnLine(line1[0],i, i + 1)){
if(isOnLine(line1[0],line1[1] , i)){
line2.push_back(i+1) ;
}else line2.push_back(i) ;
break ;
}else{
line1.push_back(i) ;
line1.push_back(i+1) ;
}
}
if(line2.size() == 1)line2.push_back(n) ;
finish() ;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |