0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 18:31:59 +00:00

P7079 [NWRRC2013]Arrangement of Contest

R42171430
This commit is contained in:
Baoshuo Ren 2020-11-19 17:27:53 +08:00 committed by Baoshuo Ren
parent 823693a42b
commit c365bbcc70
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

23
problem/P7079/P7079.cpp Normal file
View File

@ -0,0 +1,23 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, f[105], ans = 0;
string s[105];
char now = 'A';
memset(f, 0x00, sizeof(f));
cin >> n;
for (int i = 0; i < n; i++) {
cin >> s[i];
}
sort(s, s + n);
for (int i = 0; i < n; i++) {
if (s[i][0] == now) {
ans++;
now++;
}
}
cout << ans << endl;
return 0;
}