QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394432 | #4913. 子集匹配 | Andy_Lin | 0 | 536ms | 20148kb | C++14 | 354b | 2024-04-20 14:44:30 | 2024-04-20 14:44:31 |
Judging History
answer
#include<bits/stdc++.h>
#include"hall.h"
using namespace std;
int solve(int n,int K,int s){
int mi=0,sum=0;
for(int i=0;i<n;++i){
if((s>>i)&1)++sum;
else --sum;
mi=min(mi,sum);
}
sum=0;int ans=0;
for(int i=0;i<n;++i){
if((s>>i)&1)++sum;
else --sum;
if(sum==mi){
return (s^(1<<i+1));
}
}
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3632kb
input:
14 8
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #2:
score: 0
Wrong Answer
time: 1ms
memory: 3608kb
input:
15 8
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #3:
score: 0
Wrong Answer
time: 1ms
memory: 3640kb
input:
15 9
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 3608kb
input:
15 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #5:
score: 0
Wrong Answer
time: 2ms
memory: 3720kb
input:
18 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #6:
score: 0
Wrong Answer
time: 4ms
memory: 3860kb
input:
19 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #7:
score: 0
Wrong Answer
time: 3ms
memory: 4112kb
input:
19 11
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #8:
score: 0
Wrong Answer
time: 2ms
memory: 3824kb
input:
19 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #9:
score: 0
Wrong Answer
time: 28ms
memory: 4752kb
input:
22 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #10:
score: 0
Wrong Answer
time: 58ms
memory: 4904kb
input:
23 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #11:
score: 0
Wrong Answer
time: 49ms
memory: 5460kb
input:
23 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #12:
score: 0
Runtime Error
input:
23 14
output:
result:
Test #13:
score: 0
Wrong Answer
time: 114ms
memory: 6828kb
input:
24 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #14:
score: 0
Wrong Answer
time: 249ms
memory: 8876kb
input:
25 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #15:
score: 0
Runtime Error
input:
25 14
output:
result:
Test #16:
score: 0
Runtime Error
input:
25 15
output:
result:
Test #17:
score: 0
Runtime Error
input:
26 14
output:
result:
Test #18:
score: 0
Runtime Error
input:
27 14
output:
result:
Test #19:
score: 0
Runtime Error
input:
27 15
output:
result:
Test #20:
score: 0
Wrong Answer
time: 536ms
memory: 20148kb
input:
27 16
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'