이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "ramen.h"
bool check[410];
void Ramen(int N) {
int i;
int ansx,ansy;
if(N == 1){
Answer(0,0);
return;
}
for(i=0; i+1<N; i+=2){
if(Compare(i,i+1) == 1) check[i] = true;
else check[i+1] = true;
}
if(check[0]) ansy = 0;
else ansy = 1;
if(N%2 == 1) check[N-1] = true;
for(i=2; i<N; i++){
if(!check[i]) continue;
if(Compare(ansy,i) == -1) ansy = i;
}
if(N%2 == 1) check[N-1] = false;
if(!check[0]) ansx = 0;
else ansx = 1;
for(i=2; i<N; i++){
if(check[i]) continue;
if(Compare(ansx,i) == 1) ansx = i;
}
Answer(ansx,ansy);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |