-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathA_Important_Exam.cpp
More file actions
52 lines (50 loc) · 1.31 KB
/
A_Important_Exam.cpp
File metadata and controls
52 lines (50 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
``````````````
``` আরেহ বস ```
``` ভালো তোহ ```
``` ? ```
``` ```
``` ```
````````````
*/
#include<bits/stdc++.h>
using namespace std;
int t, count;
#define ll long long
#define yes cout << "YES" << endl;
#define no cout << "NO" << endl;
#define cout(n) cout << n << endl;
#define TestCase cin >> t; while(t--)
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, m;
cin >> n >> m;
char A[m + 1];
int B[m + 1];
while(n--){
cin >> A;
int a = 0, b = 0, c = 0, d = 0, e = 0;
for(int i = 0; i < m; i++){
if(A[i] == 'A'){
a++;
}
if(A[i] == 'B'){
b++;
}
if(A[i] == 'C'){
c++;
}
if(A[i] == 'D'){
d++;
}
if(A[i] == 'E'){
e++;
}
sum += max(a, b, c, d, e) * A[i];
}
}
return 0;
}