Submission #537000

# Submission time Handle Problem Language Result Execution time Memory
537000 2022-03-14T09:17:19 Z Hydroxic_Acid Speedrun (RMI21_speedrun) C++17
0 / 100
1 ms 748 KB
#include "speedrun.h"
#include <iostream>
#include <map>
#include <set>
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 = 1; i <= N; i++){
		int j = 1;
		int temp = cen;
		while(temp){
			if(temp % 2){
				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;
	if(start != cen) left--;
	while(left > 0){
		if(start == cen){
			while(!goTo(N) && N > 0)N--;
			start = N; N--; left--;
		}
		else{
			goTo(cen);
		}
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 616 KB Invalid node index to goTo
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 632 KB Invalid node index to goTo
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 616 KB Invalid node index to goTo
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 748 KB Invalid node index to goTo
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 748 KB Invalid node index to goTo
2 Halted 0 ms 0 KB -