QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394360 | #4913. 子集匹配 | Jelly_prx | Compile Error | / | / | C++14 | 211b | 2024-04-20 13:43:29 | 2024-04-20 13:43:29 |
Judging History
answer
#include<hall.h>
#include<cstdio>
int solve(int n,int k,int s){
int mn=0,pos=0,tot=0;
for(int i=1;i<=n;i++){
if(s&(1<<i-1)) tot++;
else tot--;
if(tot<mn) mn=tot,pos=i;
}
return s^(1<<pos);
}
详细
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.