QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#400966 | #4913. 子集匹配 | 11d10xy | Compile Error | / | / | C++17 | 266b | 2024-04-27 19:17:19 | 2024-04-27 19:17:20 |
Judging History
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];
}
詳細信息
implementer.cpp: In function ‘int main()’: implementer.cpp:37:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 37 | scanf("%d %d",&n,&K); assert(1<=n&&n<=27&&2*K>n); | ~~~~~^~~~~~~~~~~~~~~ answer.code:1:9: fatal error: hall.h: No such file or directory 1 | #include<hall.h> | ^~~~~~~~ compilation terminated.