QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#666247#6611. United in Stormwindlonelywolf#WA 1ms3852kbC++20651b2024-10-22 17:19:502024-10-22 17:19:51

Judging History

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

  • [2024-10-22 17:19:51]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3852kb
  • [2024-10-22 17:19:50]
  • 提交

answer

#include <bits/stdc++.h>  
using namespace std;  

#define int long long  

signed main() {  
    ios::sync_with_stdio(false);
    cin.tie(nullptr);  

	int n, m, k;
	cin >> n >> m >> k;

	vector<int> a(m + 1);
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			char c;
			cin >> c;
			if (c == 'A') {
				a[j]++;
			}
		}
	}
	for (int i = 1; i <= m; i++) {
		a[i] = (n - a[i]) * a[i];
	}

	int ans = 0;
	for (int t = 1; t < (1LL << m); t++) {
		for (int i = 0; i < m; i++) {
			if ((t >> i & 1) && a[i + 1] >= k) {
				ans++;
				break;
			}
		}
	}

	cout << ans << "\n";

    return 0;
}  
  

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3852kb

input:

2 2 1
AA
BB

output:

3

result:

ok 1 number(s): "3"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3560kb

input:

2 2 1
AA
AB

output:

2

result:

ok 1 number(s): "2"

Test #3:

score: -100
Wrong Answer
time: 1ms
memory: 3560kb

input:

5000 10 12302135
AABAAAABBA
AAABAABBAB
BAABABAAAB
ABBAABBBBA
BAAAAABAAB
BABBAAAAAA
BABBABABAB
BBABBAAAAB
BABBABBBBA
AAAAAAABAA
BBBBBAABBA
BAABABBAAB
BABAAABAAA
AAAAABAABB
BBABAABABB
ABAABBABBA
BBBAAABABA
BAAABABBAB
ABAAAAABAA
AABBBBBBAA
ABBABBABBA
AABBBABBAB
BAABBAAABB
BAAABBBBBB
ABABBAABBB
BABBABBA...

output:

0

result:

wrong answer 1st numbers differ - expected: '300', found: '0'