QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#394394#4913. 子集匹配biuld0 754ms20360kbC++14547b2024-04-20 14:17:182024-04-20 14:17:18

Judging History

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

  • [2024-04-20 14:17:18]
  • 评测
  • 测评结果:0
  • 用时:754ms
  • 内存:20360kb
  • [2024-04-20 14:17:18]
  • 提交

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));
	// 		continue;
	// 	}
	// 	else if((S >> (n - i) & 1)){
	// 		ans += (1 << (n - i));
	// 	}
	// }
	// return ans;
	return S ^ (1 << (n - p - 1));
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3712kb

input:

14 8

output:

WA

result:

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

Test #2:

score: 0
Wrong Answer
time: 1ms
memory: 3632kb

input:

15 8

output:

WA

result:

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

Test #3:

score: 0
Wrong Answer
time: 1ms
memory: 3628kb

input:

15 9

output:

WA

result:

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

Test #4:

score: 0
Wrong Answer
time: 1ms
memory: 3960kb

input:

15 10

output:

WA

result:

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

Test #5:

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

input:

18 10

output:

WA

result:

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

Test #6:

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

input:

19 10

output:

WA

result:

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

Test #7:

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

input:

19 11

output:

WA

result:

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

Test #8:

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

input:

19 12

output:

WA

result:

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

Test #9:

score: 0
Wrong Answer
time: 32ms
memory: 4492kb

input:

22 12

output:

WA

result:

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

Test #10:

score: 0
Wrong Answer
time: 70ms
memory: 4744kb

input:

23 12

output:

WA

result:

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

Test #11:

score: 0
Wrong Answer
time: 56ms
memory: 4680kb

input:

23 13

output:

WA

result:

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

Test #12:

score: 0
Wrong Answer
time: 34ms
memory: 4976kb

input:

23 14

output:

WA

result:

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

Test #13:

score: 0
Wrong Answer
time: 131ms
memory: 5672kb

input:

24 13

output:

WA

result:

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

Test #14:

score: 0
Wrong Answer
time: 310ms
memory: 7692kb

input:

25 13

output:

WA

result:

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

Test #15:

score: 0
Wrong Answer
time: 245ms
memory: 7720kb

input:

25 14

output:

WA

result:

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

Test #16:

score: 0
Wrong Answer
time: 163ms
memory: 8076kb

input:

25 15

output:

WA

result:

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

Test #17:

score: 0
Wrong Answer
time: 662ms
memory: 11848kb

input:

26 14

output:

WA

result:

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

Test #18:

score: 0
Wrong Answer
time: 754ms
memory: 20360kb

input:

27 14

output:

WA

result:

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

Test #19:

score: 0
Wrong Answer
time: 696ms
memory: 20148kb

input:

27 15

output:

WA

result:

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

Test #20:

score: 0
Wrong Answer
time: 647ms
memory: 20320kb

input:

27 16

output:

WA

result:

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