QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#59729 | #1366. Exam Manipulation | Beevo# | WA | 429ms | 3652kb | C++23 | 853b | 2022-10-31 22:20:36 | 2022-10-31 22:20:38 |
Judging History
answer
#include <bits/stdc++.h>
#define el '\n'
#define ll long long
#define ld long double
#define Beevo ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
void testCase() {
int n, k;
cin >> n >> k;
string a[n];
for (int i = 0; i < n; i++)
cin >> a[i];
int sol = 0;
for (int msk = 0; msk < (1 << k); msk++) {
int mn = 1e9;
for (int i = 0; i < n; i++) {
int curSol = 0;
for (int bit = 0; bit < msk; bit++)
curSol += (msk & (1 << bit) ? (a[i][bit] == 'T') : (a[i][bit] == 'F'));
mn = min(mn, curSol);
}
sol = max(sol, mn);
}
cout << sol;
}
signed main() {
Beevo
int T = 1;
// cin >> T;
while (T--)
testCase();
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 2ms
memory: 3576kb
input:
1 1 T
output:
1
result:
ok single line: '1'
Test #2:
score: 0
Accepted
time: 2ms
memory: 3568kb
input:
1 10 TFTFTFTFTF
output:
10
result:
ok single line: '10'
Test #3:
score: 0
Accepted
time: 429ms
memory: 3572kb
input:
1000 10 TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTFTFTF TFTFTF...
output:
10
result:
ok single line: '10'
Test #4:
score: -100
Wrong Answer
time: 428ms
memory: 3652kb
input:
1000 10 TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTFTFTF FTFTFTFTFT TFTFTF...
output:
10
result:
wrong answer 1st lines differ - expected: '5', found: '10'