QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#319229#4912. WereYouLastUnknown15080 1ms5108kbC++20444b2024-02-02 10:33:092024-02-02 10:33:10

Judging History

你现在查看的是最新测评结果

  • [2024-02-02 10:33:10]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:5108kb
  • [2024-02-02 10:33:09]
  • 提交

answer

// Function signatures
bool query(int);
void modify(int, bool);

// Main function
bool WereYouLast(int n, int m){
	if (n == (1 << 10) && m == 10){
		// Subtask 1
		int crr = 0;
		for (int i = 0; i < m; i++){
			if (query(i)) crr += (1 << i);
		}
		if (crr == n-1) return true;
		crr++;
		for (int i = 0; i < m; i++){
			if ((crr >> i) & 1) modify(i, true);
			else modify(i, false);
		}
		return false;
	}
	return true;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3852kb

input:

1024 10

output:

12345876 -2 0

result:

wrong answer Invalid Operation At Position 0.

Subtask #2:

score: 0
Wrong Answer

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 4964kb

input:

65536 100000

output:

12345876 -3 1
12345876 -3 1

result:

wrong answer Wrong Answer At Query 1.

Subtask #3:

score: 0
Wrong Answer

Test #3:

score: 0
Wrong Answer
time: 1ms
memory: 5108kb

input:

1048576 100000

output:

12345876 -3 1
12345876 -3 1

result:

wrong answer Wrong Answer At Query 1.

Subtask #4:

score: 0
Wrong Answer

Test #4:

score: 0
Wrong Answer
time: 1ms
memory: 4956kb

input:

67108864 100000

output:

12345876 -3 1
12345876 -3 1

result:

wrong answer Wrong Answer At Query 1.