QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#394165#4913. 子集匹配Xun_xiaoyao100 ✓942ms20340kbC++14236b2024-04-20 09:19:212024-04-20 09:19:21

Judging History

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

  • [2024-04-20 09:19:21]
  • 评测
  • 测评结果:100
  • 用时:942ms
  • 内存:20340kb
  • [2024-04-20 09:19:21]
  • 提交

answer

#include "hall.h"
#include <bits/stdc++.h>
using namespace std;

int p[100],mx;
int solve(int n,int K,int s)
{
	p[0]=mx=0;
	for(int i=1;i<=n;i++)
	{
		p[i]=(s&(1<<i-1)?p[i-1]-1:p[i-1]+1);
		if(p[i]>=p[mx]) mx=i;
	}
	return s^(1<<mx);
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

14 8

output:

OK

result:

ok "OK"

Test #2:

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

input:

15 8

output:

OK

result:

ok "OK"

Test #3:

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

input:

15 9

output:

OK

result:

ok "OK"

Test #4:

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

input:

15 10

output:

OK

result:

ok "OK"

Test #5:

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

input:

18 10

output:

OK

result:

ok "OK"

Test #6:

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

input:

19 10

output:

OK

result:

ok "OK"

Test #7:

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

input:

19 11

output:

OK

result:

ok "OK"

Test #8:

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

input:

19 12

output:

OK

result:

ok "OK"

Test #9:

score: 5
Accepted
time: 50ms
memory: 4224kb

input:

22 12

output:

OK

result:

ok "OK"

Test #10:

score: 5
Accepted
time: 106ms
memory: 4692kb

input:

23 12

output:

OK

result:

ok "OK"

Test #11:

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

input:

23 13

output:

OK

result:

ok "OK"

Test #12:

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

input:

23 14

output:

OK

result:

ok "OK"

Test #13:

score: 5
Accepted
time: 199ms
memory: 5808kb

input:

24 13

output:

OK

result:

ok "OK"

Test #14:

score: 5
Accepted
time: 442ms
memory: 7860kb

input:

25 13

output:

OK

result:

ok "OK"

Test #15:

score: 5
Accepted
time: 373ms
memory: 7868kb

input:

25 14

output:

OK

result:

ok "OK"

Test #16:

score: 5
Accepted
time: 269ms
memory: 7732kb

input:

25 15

output:

OK

result:

ok "OK"

Test #17:

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

input:

26 14

output:

OK

result:

ok "OK"

Test #18:

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

input:

27 14

output:

OK

result:

ok "OK"

Test #19:

score: 5
Accepted
time: 942ms
memory: 20340kb

input:

27 15

output:

OK

result:

ok "OK"

Test #20:

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

input:

27 16

output:

OK

result:

ok "OK"