QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#394291 | #4913. 子集匹配 | chenyitaoooo | Compile Error | / | / | C++14 | 195b | 2024-04-20 11:04:32 | 2024-04-20 11:04:32 |
Judging History
answer
#include<hall.h>
int solve(int n,int L,int s){
int mi=0,wei=0,nw=0;
for(int i=0; i<n; ++i){
if((s>>i)&1) nw++;
else nw--;
if(nw<=mi) mi=nw,wei=i+1;
}
s^=(1<<wei);
return s;
}
Details
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.