QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394384 | #4913. 子集匹配 | biuld | Compile Error | / | / | C++14 | 501b | 2024-04-20 14:07:20 | 2024-04-20 14:07:20 |
Judging History
answer
#include<bits/stdc++.h>
#include<hall.h>
using namespace std;
inline int solve(int n, int k, int S){
int mn = 0, p = 0, now = 0;
for(int i = 1; i <= n; ++ i){
if((S >> (n - i)) & 1){
now ++;
}
else{
now --;
}
if(now < mn){
mn = now;
p = i;
}
}
int ans = 0;
for(int i = 1; i <= n; ++ i){
if(i - 1 == p){
ans += (1 << (n - i));
}
else if((S >> (n - i) & 1)){
ans += (1 << (n - i));
}
}
return ans;
}
int main(){
return 0;
}
详细
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:2:9: fatal error: hall.h: No such file or directory 2 | #include<hall.h> | ^~~~~~~~ compilation terminated.