QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394588 | #4913. 子集匹配 | le0n | 0 | 494ms | 20372kb | C++14 | 230b | 2024-04-20 16:30:08 | 2024-04-20 16:30:08 |
Judging History
answer
#include "hall.h"
int solve(int n, int K, int s)
{
int i, t = 0, mn = 0, p = -1;
for(i = 0; i < n; i++)
{
t += 2 * ((s >> i) & 1) - 1;
if(t < mn)
{
mn = t;
p = i;
}
}
return s ^ (1 << (p + 1));
}
详细
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3768kb
input:
14 8
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #2:
score: 0
Wrong Answer
time: 1ms
memory: 3960kb
input:
15 8
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #3:
score: 0
Wrong Answer
time: 1ms
memory: 3760kb
input:
15 9
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #4:
score: 0
Wrong Answer
time: 0ms
memory: 3632kb
input:
15 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #5:
score: 0
Wrong Answer
time: 2ms
memory: 4024kb
input:
18 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #6:
score: 0
Wrong Answer
time: 4ms
memory: 4024kb
input:
19 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #7:
score: 0
Wrong Answer
time: 3ms
memory: 3888kb
input:
19 11
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #8:
score: 0
Wrong Answer
time: 2ms
memory: 3688kb
input:
19 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #9:
score: 0
Wrong Answer
time: 25ms
memory: 4180kb
input:
22 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #10:
score: 0
Wrong Answer
time: 53ms
memory: 5012kb
input:
23 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #11:
score: 0
Wrong Answer
time: 44ms
memory: 4844kb
input:
23 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #12:
score: 0
Wrong Answer
time: 31ms
memory: 4984kb
input:
23 14
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #13:
score: 0
Wrong Answer
time: 99ms
memory: 5808kb
input:
24 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #14:
score: 0
Wrong Answer
time: 217ms
memory: 7864kb
input:
25 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #15:
score: 0
Wrong Answer
time: 182ms
memory: 7724kb
input:
25 14
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #16:
score: 0
Wrong Answer
time: 128ms
memory: 7728kb
input:
25 15
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #17:
score: 0
Wrong Answer
time: 422ms
memory: 11812kb
input:
26 14
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #18:
score: 0
Wrong Answer
time: 494ms
memory: 20372kb
input:
27 14
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #19:
score: 0
Wrong Answer
time: 468ms
memory: 20068kb
input:
27 15
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #20:
score: 0
Wrong Answer
time: 455ms
memory: 20020kb
input:
27 16
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'