QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#101331 | #4913. 子集匹配 | lingchen | Compile Error | / | / | C++14 | 245b | 2023-04-29 10:24:09 | 2023-04-29 10:24:12 |
Judging History
你现在查看的是最新测评结果
- [2023-08-10 23:21:45]
- System Update: QOJ starts to keep a history of the judgings of all the submissions.
- [2023-04-29 10:24:12]
- 评测
- 测评结果:Compile Error
- 用时:0ms
- 内存:0kb
- [2023-04-29 10:24:09]
- 提交
answer
#include "hall.h"
// #include "grader.cpp"
#include<cstdio>
using namespace std;
bitset<1<<15> b;
int solve(int n,int K,int s)
{
for(int i=0; i<n; i++)
if(((s>>i)&1)&&!b[s^(1<<i)])
{
b[s^(1<<i)]=1;
return s^(1<<i);
}
}
详细
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:6:1: error: ‘bitset’ does not name a type 6 | bitset<1<<15> b; | ^~~~~~ answer.code: In function ‘int solve(int, int, int)’: answer.code:11:25: error: ‘b’ was not declared in this scope 11 | if(((s>>i)&1)&&!b[s^(1<<i)]) | ^ answer.code:16:1: warning: control reaches end of non-void function [-Wreturn-type] 16 | } | ^