QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#394240#4913. 子集匹配luanmenglei0 365ms20144kbC++17268b2024-04-20 10:29:502024-04-20 10:29:51

Judging History

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

  • [2024-04-20 10:29:51]
  • 评测
  • 测评结果:0
  • 用时:365ms
  • 内存:20144kb
  • [2024-04-20 10:29:50]
  • 提交

answer

#include "hall.h"

int solve(int n, int k, int S) {
	int cnt = 0;
	for (int i = 0; i < n; i ++) {
		if (S >> i & 1)
			cnt += 1;
		else
			cnt -= 1;
		if (cnt == 1) {
			for (int j = 0; j <= i; j ++)
				S ^= (1 << j);
			return S;
		}
	}
	return -1;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

14 8

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #2:

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

input:

15 8

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #3:

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

input:

15 9

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #4:

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

input:

15 10

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #5:

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

input:

18 10

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #6:

score: 0
Wrong Answer
time: 3ms
memory: 3668kb

input:

19 10

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #7:

score: 0
Wrong Answer
time: 2ms
memory: 3696kb

input:

19 11

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #8:

score: 0
Wrong Answer
time: 2ms
memory: 4048kb

input:

19 12

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #9:

score: 0
Wrong Answer
time: 13ms
memory: 4140kb

input:

22 12

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #10:

score: 0
Wrong Answer
time: 36ms
memory: 4796kb

input:

23 12

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #11:

score: 0
Wrong Answer
time: 25ms
memory: 4792kb

input:

23 13

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #12:

score: 0
Wrong Answer
time: 20ms
memory: 4648kb

input:

23 14

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #13:

score: 0
Wrong Answer
time: 62ms
memory: 5740kb

input:

24 13

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #14:

score: 0
Wrong Answer
time: 146ms
memory: 8052kb

input:

25 13

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #15:

score: 0
Wrong Answer
time: 123ms
memory: 7848kb

input:

25 14

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #16:

score: 0
Wrong Answer
time: 82ms
memory: 7808kb

input:

25 15

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #17:

score: 0
Wrong Answer
time: 270ms
memory: 11960kb

input:

26 14

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #18:

score: 0
Wrong Answer
time: 365ms
memory: 20144kb

input:

27 14

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #19:

score: 0
Wrong Answer
time: 253ms
memory: 20012kb

input:

27 15

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #20:

score: 0
Wrong Answer
time: 269ms
memory: 19972kb

input:

27 16

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'