QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#400967#4913. 子集匹配11d10xy0 0ms0kbC++17266b2024-04-27 19:17:422024-04-27 19:17:44

Judging History

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

  • [2024-04-27 19:17:44]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2024-04-27 19:17:42]
  • 提交

answer

#include"hall.h"
int solve(int n,int k,int s){
   int a[30],m=1;a[1]=0;
   for(int i=0;i<n;i++)if(s>>i&1&&m>1&&a[m]!=(s&(1<<i-1)-1)){
      m--;for(int k=1;k<=m;k++)a[k]|=1<<i;
   }else a[m+1]=a[m]|1<<i,m++;
   for(int i=1;i<=m;i++)if(a[i]==s)return a[i-1];
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Runtime Error

input:

14 8

output:


result:


Test #2:

score: 0
Runtime Error

input:

15 8

output:


result:


Test #3:

score: 0
Runtime Error

input:

15 9

output:


result:


Test #4:

score: 0
Runtime Error

input:

15 10

output:


result:


Test #5:

score: 0
Runtime Error

input:

18 10

output:


result:


Test #6:

score: 0
Runtime Error

input:

19 10

output:


result:


Test #7:

score: 0
Runtime Error

input:

19 11

output:


result:


Test #8:

score: 0
Runtime Error

input:

19 12

output:


result:


Test #9:

score: 0
Runtime Error

input:

22 12

output:


result:


Test #10:

score: 0
Runtime Error

input:

23 12

output:


result:


Test #11:

score: 0
Runtime Error

input:

23 13

output:


result:


Test #12:

score: 0
Runtime Error

input:

23 14

output:


result:


Test #13:

score: 0
Runtime Error

input:

24 13

output:


result:


Test #14:

score: 0
Runtime Error

input:

25 13

output:


result:


Test #15:

score: 0
Runtime Error

input:

25 14

output:


result:


Test #16:

score: 0
Runtime Error

input:

25 15

output:


result:


Test #17:

score: 0
Runtime Error

input:

26 14

output:


result:


Test #18:

score: 0
Runtime Error

input:

27 14

output:


result:


Test #19:

score: 0
Runtime Error

input:

27 15

output:


result:


Test #20:

score: 0
Runtime Error

input:

27 16

output:


result: