QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394286 | #4913. 子集匹配 | chenyitaoooo | 100 ✓ | 879ms | 20348kb | C++14 | 260b | 2024-04-20 10:55:56 | 2024-04-20 10:55:57 |
Judging History
answer
#include"hall.h"
//#include<bits/stdc++.h>
using namespace std;
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;
}
//int main(){}
詳細信息
Test #1:
score: 5
Accepted
time: 1ms
memory: 3576kb
input:
14 8
output:
OK
result:
ok "OK"
Test #2:
score: 5
Accepted
time: 0ms
memory: 3676kb
input:
15 8
output:
OK
result:
ok "OK"
Test #3:
score: 5
Accepted
time: 1ms
memory: 3940kb
input:
15 9
output:
OK
result:
ok "OK"
Test #4:
score: 5
Accepted
time: 1ms
memory: 3936kb
input:
15 10
output:
OK
result:
ok "OK"
Test #5:
score: 5
Accepted
time: 3ms
memory: 3712kb
input:
18 10
output:
OK
result:
ok "OK"
Test #6:
score: 5
Accepted
time: 5ms
memory: 3672kb
input:
19 10
output:
OK
result:
ok "OK"
Test #7:
score: 5
Accepted
time: 3ms
memory: 3804kb
input:
19 11
output:
OK
result:
ok "OK"
Test #8:
score: 5
Accepted
time: 2ms
memory: 3812kb
input:
19 12
output:
OK
result:
ok "OK"
Test #9:
score: 5
Accepted
time: 28ms
memory: 4160kb
input:
22 12
output:
OK
result:
ok "OK"
Test #10:
score: 5
Accepted
time: 59ms
memory: 4812kb
input:
23 12
output:
OK
result:
ok "OK"
Test #11:
score: 5
Accepted
time: 46ms
memory: 4772kb
input:
23 13
output:
OK
result:
ok "OK"
Test #12:
score: 5
Accepted
time: 32ms
memory: 4768kb
input:
23 14
output:
OK
result:
ok "OK"
Test #13:
score: 5
Accepted
time: 103ms
memory: 6036kb
input:
24 13
output:
OK
result:
ok "OK"
Test #14:
score: 5
Accepted
time: 239ms
memory: 7780kb
input:
25 13
output:
OK
result:
ok "OK"
Test #15:
score: 5
Accepted
time: 204ms
memory: 7848kb
input:
25 14
output:
OK
result:
ok "OK"
Test #16:
score: 5
Accepted
time: 140ms
memory: 7852kb
input:
25 15
output:
OK
result:
ok "OK"
Test #17:
score: 5
Accepted
time: 509ms
memory: 11928kb
input:
26 14
output:
OK
result:
ok "OK"
Test #18:
score: 5
Accepted
time: 879ms
memory: 20056kb
input:
27 14
output:
OK
result:
ok "OK"
Test #19:
score: 5
Accepted
time: 854ms
memory: 20348kb
input:
27 15
output:
OK
result:
ok "OK"
Test #20:
score: 5
Accepted
time: 647ms
memory: 19988kb
input:
27 16
output:
OK
result:
ok "OK"