QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#417102#4913. 子集匹配zhaohaikun100 ✓1017ms20224kbC++20124b2024-05-22 14:22:512024-05-22 14:22:51

Judging History

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

  • [2024-05-22 14:22:51]
  • 评测
  • 测评结果:100
  • 用时:1017ms
  • 内存:20224kb
  • [2024-05-22 14:22:51]
  • 提交

answer

#include"hall.h"
int solve(int n,int K,int s){int p=0,G,w=G,i=0;for(;i<n;i++)s>>i&1?--w:++w>=G&&(p=i+1,G=w);return 1<<p^s;}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 5
Accepted
time: 1ms
memory: 3528kb

input:

14 8

output:

OK

result:

ok "OK"

Test #2:

score: 5
Accepted
time: 1ms
memory: 3520kb

input:

15 8

output:

OK

result:

ok "OK"

Test #3:

score: 5
Accepted
time: 0ms
memory: 3736kb

input:

15 9

output:

OK

result:

ok "OK"

Test #4:

score: 5
Accepted
time: 1ms
memory: 3580kb

input:

15 10

output:

OK

result:

ok "OK"

Test #5:

score: 5
Accepted
time: 4ms
memory: 3528kb

input:

18 10

output:

OK

result:

ok "OK"

Test #6:

score: 5
Accepted
time: 7ms
memory: 3592kb

input:

19 10

output:

OK

result:

ok "OK"

Test #7:

score: 5
Accepted
time: 6ms
memory: 3696kb

input:

19 11

output:

OK

result:

ok "OK"

Test #8:

score: 5
Accepted
time: 4ms
memory: 3908kb

input:

19 12

output:

OK

result:

ok "OK"

Test #9:

score: 5
Accepted
time: 49ms
memory: 4248kb

input:

22 12

output:

OK

result:

ok "OK"

Test #10:

score: 5
Accepted
time: 100ms
memory: 4568kb

input:

23 12

output:

OK

result:

ok "OK"

Test #11:

score: 5
Accepted
time: 87ms
memory: 4660kb

input:

23 13

output:

OK

result:

ok "OK"

Test #12:

score: 5
Accepted
time: 63ms
memory: 4652kb

input:

23 14

output:

OK

result:

ok "OK"

Test #13:

score: 5
Accepted
time: 200ms
memory: 5680kb

input:

24 13

output:

OK

result:

ok "OK"

Test #14:

score: 5
Accepted
time: 430ms
memory: 7828kb

input:

25 13

output:

OK

result:

ok "OK"

Test #15:

score: 5
Accepted
time: 363ms
memory: 7728kb

input:

25 14

output:

OK

result:

ok "OK"

Test #16:

score: 5
Accepted
time: 262ms
memory: 7632kb

input:

25 15

output:

OK

result:

ok "OK"

Test #17:

score: 5
Accepted
time: 854ms
memory: 11868kb

input:

26 14

output:

OK

result:

ok "OK"

Test #18:

score: 5
Accepted
time: 1008ms
memory: 20008kb

input:

27 14

output:

OK

result:

ok "OK"

Test #19:

score: 5
Accepted
time: 1017ms
memory: 20224kb

input:

27 15

output:

OK

result:

ok "OK"

Test #20:

score: 5
Accepted
time: 959ms
memory: 19960kb

input:

27 16

output:

OK

result:

ok "OK"