QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#394496#4913. 子集匹配jiajia75 1094ms20136kbC++20263b2024-04-20 15:18:442024-04-20 15:18:44

Judging History

你现在查看的是最新测评结果

  • [2024-04-20 15:18:44]
  • 评测
  • 测评结果:75
  • 用时:1094ms
  • 内存:20136kb
  • [2024-04-20 15:18:44]
  • 提交

answer

#include "hall.h"
#include <cstdio>
using namespace std;

int solve(int n, int K, int s) {
	int p = -1, mn = 1e9, w = 0;
	for (int i = 0; i < n; i++) {
		if (s >> i & 1) w++;
		else w--;
		if (w <= mn) p = i, mn = w;
	}
	return s ^ (1 << (p + 1));
}

詳細信息

Test #1:

score: 5
Accepted
time: 1ms
memory: 3580kb

input:

14 8

output:

OK

result:

ok "OK"

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 3644kb

input:

15 8

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #3:

score: 5
Accepted
time: 1ms
memory: 3984kb

input:

15 9

output:

OK

result:

ok "OK"

Test #4:

score: 5
Accepted
time: 1ms
memory: 3808kb

input:

15 10

output:

OK

result:

ok "OK"

Test #5:

score: 5
Accepted
time: 0ms
memory: 3836kb

input:

18 10

output:

OK

result:

ok "OK"

Test #6:

score: 0
Wrong Answer
time: 2ms
memory: 4024kb

input:

19 10

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #7:

score: 5
Accepted
time: 4ms
memory: 3812kb

input:

19 11

output:

OK

result:

ok "OK"

Test #8:

score: 5
Accepted
time: 0ms
memory: 3816kb

input:

19 12

output:

OK

result:

ok "OK"

Test #9:

score: 5
Accepted
time: 30ms
memory: 4092kb

input:

22 12

output:

OK

result:

ok "OK"

Test #10:

score: 0
Wrong Answer
time: 66ms
memory: 4864kb

input:

23 12

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #11:

score: 5
Accepted
time: 51ms
memory: 4828kb

input:

23 13

output:

OK

result:

ok "OK"

Test #12:

score: 5
Accepted
time: 37ms
memory: 4992kb

input:

23 14

output:

OK

result:

ok "OK"

Test #13:

score: 5
Accepted
time: 131ms
memory: 5796kb

input:

24 13

output:

OK

result:

ok "OK"

Test #14:

score: 0
Wrong Answer
time: 365ms
memory: 8844kb

input:

25 13

output:

WA

result:

wrong answer 1st words differ - expected: 'OK', found: 'WA'

Test #15:

score: 5
Accepted
time: 258ms
memory: 7672kb

input:

25 14

output:

OK

result:

ok "OK"

Test #16:

score: 5
Accepted
time: 193ms
memory: 7832kb

input:

25 15

output:

OK

result:

ok "OK"

Test #17:

score: 5
Accepted
time: 846ms
memory: 11996kb

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: 1094ms
memory: 19964kb

input:

27 15

output:

OK

result:

ok "OK"

Test #20:

score: 5
Accepted
time: 1043ms
memory: 20136kb

input:

27 16

output:

OK

result:

ok "OK"