QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394225 | #4913. 子集匹配 | linweitong | 75 | 675ms | 20348kb | C++20 | 212b | 2024-04-20 10:26:11 | 2024-04-20 10:26:11 |
Judging History
answer
#include"hall.h"
using namespace std;
int solve(int n,int K,int s){
int o=0,ss=n+1,mn=0;
for (int i=0;i<n;++i){
int j=(s>>i)&1;
o+=(j==1?1:(-1));
if (o<=ss)ss=o,mn=i;
}
return s^(1<<(mn+1));
}
詳細信息
Test #1:
score: 5
Accepted
time: 1ms
memory: 3744kb
input:
14 8
output:
OK
result:
ok "OK"
Test #2:
score: 0
Wrong Answer
time: 1ms
memory: 3968kb
input:
15 8
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #3:
score: 5
Accepted
time: 0ms
memory: 3752kb
input:
15 9
output:
OK
result:
ok "OK"
Test #4:
score: 5
Accepted
time: 1ms
memory: 3744kb
input:
15 10
output:
OK
result:
ok "OK"
Test #5:
score: 5
Accepted
time: 2ms
memory: 3768kb
input:
18 10
output:
OK
result:
ok "OK"
Test #6:
score: 0
Wrong Answer
time: 5ms
memory: 3768kb
input:
19 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #7:
score: 5
Accepted
time: 4ms
memory: 4040kb
input:
19 11
output:
OK
result:
ok "OK"
Test #8:
score: 5
Accepted
time: 2ms
memory: 3712kb
input:
19 12
output:
OK
result:
ok "OK"
Test #9:
score: 5
Accepted
time: 30ms
memory: 4200kb
input:
22 12
output:
OK
result:
ok "OK"
Test #10:
score: 0
Wrong Answer
time: 62ms
memory: 4976kb
input:
23 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #11:
score: 5
Accepted
time: 49ms
memory: 4992kb
input:
23 13
output:
OK
result:
ok "OK"
Test #12:
score: 5
Accepted
time: 33ms
memory: 4772kb
input:
23 14
output:
OK
result:
ok "OK"
Test #13:
score: 5
Accepted
time: 110ms
memory: 6016kb
input:
24 13
output:
OK
result:
ok "OK"
Test #14:
score: 0
Wrong Answer
time: 265ms
memory: 8788kb
input:
25 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #15:
score: 5
Accepted
time: 207ms
memory: 7836kb
input:
25 14
output:
OK
result:
ok "OK"
Test #16:
score: 5
Accepted
time: 142ms
memory: 8064kb
input:
25 15
output:
OK
result:
ok "OK"
Test #17:
score: 5
Accepted
time: 518ms
memory: 12160kb
input:
26 14
output:
OK
result:
ok "OK"
Test #18:
score: 0
Runtime Error
input:
27 14
output:
result:
Test #19:
score: 5
Accepted
time: 675ms
memory: 19988kb
input:
27 15
output:
OK
result:
ok "OK"
Test #20:
score: 5
Accepted
time: 666ms
memory: 20348kb
input:
27 16
output:
OK
result:
ok "OK"