Submission #982278

# Submission time Handle Problem Language Result Execution time Memory
982278 2024-05-14T05:39:01 Z Vedang1006 The Big Prize (IOI17_prize) C++14
0 / 100
1 ms 596 KB
#include "prize.h"

int find_best(int n) {
	int i = 0;

	for (int jumpSize = 30; jumpSize >= 0; jumpSize--)
	{
		while (i + (1<<jumpSize) < n && ask(i + (1<<jumpSize))[1] == 1) i += (1<<jumpSize);
	}

	return i + 1;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Incorrect 1 ms 344 KB answer is not correct
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 344 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 0 ms 596 KB Output is correct
5 Correct 0 ms 344 KB Output is correct
6 Incorrect 1 ms 344 KB answer is not correct
7 Halted 0 ms 0 KB -