이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "speedrun.h"
#include <iostream>
using namespace std;
void assignHints(int subtask, int N, int A[], int B[]) {
setHintLen(20);
int cen = 0;
if(A[0] == A[1] || A[0] == B[1]) cen = A[0];
else cen = B[0];
for(int i = 0; i < N; i++){
int j = 1;
int temp = cen;
while(temp){
if((temp&-temp) == 1){
setHint(i, j, true);
temp--;
}
temp /= 2; j++;
}
}
}
void speedrun(int subtask, int N, int start) {
int cen = 0;
for(int i = 10; i >= 0; i--){
if(getHint(i)) cen++;
cen *= 2;
}
int left = N - 1;
while(left > 0){
if(start == cen){
while(!goTo(N) && N > 0)N--;
N--;
}
else{
left--;
goTo(cen);
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |