QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#394387 | #4913. 子集匹配 | biuld | 0 | 1255ms | 20364kb | C++14 | 464b | 2024-04-20 14:09:54 | 2024-04-20 14:09:56 |
Judging History
answer
#include<bits/stdc++.h>
#include"hall.h"
using namespace std;
int solve(int n, int k, int S){
int mn = 0, p = 0, now = 0;
for(int i = 1; i <= n; ++ i){
if((S >> (n - i)) & 1){
now ++;
}
else{
now --;
}
if(now < mn){
mn = now;
p = i;
}
}
int ans = 0;
for(int i = 1; i <= n; ++ i){
if(i - 1 == p){
ans += (1 << (n - i));
}
else if((S >> (n - i) & 1)){
ans += (1 << (n - i));
}
}
return ans;
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3600kb
input:
14 8
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #2:
score: 0
Wrong Answer
time: 0ms
memory: 3668kb
input:
15 8
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #3:
score: 0
Wrong Answer
time: 0ms
memory: 4000kb
input:
15 9
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #4:
score: 0
Wrong Answer
time: 1ms
memory: 3760kb
input:
15 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #5:
score: 0
Wrong Answer
time: 5ms
memory: 3724kb
input:
18 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #6:
score: 0
Wrong Answer
time: 10ms
memory: 5676kb
input:
19 10
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #7:
score: 0
Wrong Answer
time: 8ms
memory: 3752kb
input:
19 11
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #8:
score: 0
Wrong Answer
time: 5ms
memory: 4044kb
input:
19 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #9:
score: 0
Wrong Answer
time: 70ms
memory: 4276kb
input:
22 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #10:
score: 0
Wrong Answer
time: 145ms
memory: 4800kb
input:
23 12
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #11:
score: 0
Wrong Answer
time: 120ms
memory: 4776kb
input:
23 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #12:
score: 0
Wrong Answer
time: 81ms
memory: 4652kb
input:
23 14
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #13:
score: 0
Wrong Answer
time: 268ms
memory: 5760kb
input:
24 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #14:
score: 0
Wrong Answer
time: 587ms
memory: 7800kb
input:
25 13
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #15:
score: 0
Wrong Answer
time: 481ms
memory: 7760kb
input:
25 14
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #16:
score: 0
Wrong Answer
time: 348ms
memory: 7648kb
input:
25 15
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #17:
score: 0
Wrong Answer
time: 1085ms
memory: 11860kb
input:
26 14
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #18:
score: 0
Wrong Answer
time: 1255ms
memory: 19976kb
input:
27 14
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #19:
score: 0
Wrong Answer
time: 1133ms
memory: 20364kb
input:
27 15
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'
Test #20:
score: 0
Wrong Answer
time: 1114ms
memory: 20036kb
input:
27 16
output:
WA
result:
wrong answer 1st words differ - expected: 'OK', found: 'WA'