QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#394164#4913. 子集匹配Xun_xiaoyao100 ✓938ms20380kbC++14249b2024-04-20 09:18:542024-04-20 09:18:54

Judging History

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

  • [2024-04-20 09:18:54]
  • 评测
  • 测评结果:100
  • 用时:938ms
  • 内存:20380kb
  • [2024-04-20 09:18:54]
  • 提交

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: 3784kb

input:

15 9

output:

OK

result:

ok "OK"

Test #4:

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

input:

15 10

output:

OK

result:

ok "OK"

Test #5:

score: 5
Accepted
time: 3ms
memory: 3812kb

input:

18 10

output:

OK

result:

ok "OK"

Test #6:

score: 5
Accepted
time: 3ms
memory: 4052kb

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: 3760kb

input:

19 12

output:

OK

result:

ok "OK"

Test #9:

score: 5
Accepted
time: 46ms
memory: 4508kb

input:

22 12

output:

OK

result:

ok "OK"

Test #10:

score: 5
Accepted
time: 103ms
memory: 4688kb

input:

23 12

output:

OK

result:

ok "OK"

Test #11:

score: 5
Accepted
time: 90ms
memory: 4788kb

input:

23 13

output:

OK

result:

ok "OK"

Test #12:

score: 5
Accepted
time: 65ms
memory: 4796kb

input:

23 14

output:

OK

result:

ok "OK"

Test #13:

score: 5
Accepted
time: 201ms
memory: 5880kb

input:

24 13

output:

OK

result:

ok "OK"

Test #14:

score: 5
Accepted
time: 438ms
memory: 8080kb

input:

25 13

output:

OK

result:

ok "OK"

Test #15:

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

input:

25 14

output:

OK

result:

ok "OK"

Test #16:

score: 5
Accepted
time: 268ms
memory: 8084kb

input:

25 15

output:

OK

result:

ok "OK"

Test #17:

score: 5
Accepted
time: 855ms
memory: 12180kb

input:

26 14

output:

OK

result:

ok "OK"

Test #18:

score: 5
Accepted
time: 922ms
memory: 20372kb

input:

27 14

output:

OK

result:

ok "OK"

Test #19:

score: 5
Accepted
time: 938ms
memory: 20380kb

input:

27 15

output:

OK

result:

ok "OK"

Test #20:

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

input:

27 16

output:

OK

result:

ok "OK"