QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#318025 | #4582. Uniform Maker | FSZ560# | WA | 0ms | 3744kb | C++17 | 631b | 2024-01-30 11:01:42 | 2024-01-30 11:01:43 |
Judging History
answer
#include <algorithm>
#include <iostream>
using namespace std;
int arr[30][105] = {0};
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
char c;
cin >> c;
arr[c - 'a'][j] += 1;
}
}
int ans = n * m;
for (int j = 0; j < m; ++j) {
int maxx = 0;
for (int i = 0; i < 'z' - 'a'; ++i) {
maxx = max(maxx, arr[i][j]);
}
ans -= maxx;
}
cout << ans << "\n";
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3616kb
input:
6 4 calf palm book icpc ball room
output:
14
result:
ok single line: '14'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
3 11 goodluckfor icpcjakarta contestants
output:
19
result:
ok single line: '19'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
5 14 helpiamtrapped inanincfactory forthreemonths withoutfoodand drinkandshower
output:
49
result:
ok single line: '49'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3740kb
input:
2 1 o o
output:
0
result:
ok single line: '0'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
40 6 xscwqh djjjit rguenl hhxvjg tnoyfq ownyjt asdzdz slsbph rdlksd jpcjyx bzaozh dpgxfk pozhhl zkagxn sihjxn atqiiy zwebxg ilxcnj ntkrnq ysxfri qrowho dhwaqs haljan oxjcnk dalixq ahzfrd cphsor sykafq lpzpvz xarslv rnqiau xcolzn jsuclf vkoqxx wqidkz owqnjx oodyrv hzbxda ceikgy ohxepx
output:
214
result:
ok single line: '214'
Test #6:
score: -100
Wrong Answer
time: 0ms
memory: 3628kb
input:
61 45 gxpedrilqbjsxgwblbnbmxetlxersnnhizajpmqjazzer ihrfbypimkhqgxnljylpilzpdjcriqpvrkkazzjlsyqrv gzoxytcshicdtbagdlgnwueyldicppytywbypzxkujfdt rerxwaccmqpjgcezwxbhmmdmlnzzlcwbdmhlkgkbrdiws kqjkaljprbqvxqrsinicvkukhisaotkcnpcsrqayxcrwx aanykynujzejawnuvsjqfhcnchfacagdbnbfwjeboxuxl xdifsllnhjbuktkyea...
output:
2488
result:
wrong answer 1st lines differ - expected: '2485', found: '2488'