0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-26 22:32:01 +00:00
OI-codes/Luogu/P7079/P7079.cpp

24 lines
414 B
C++
Raw Normal View History

#include <bits/stdc++.h>
using namespace std;
int main() {
2021-11-19 09:01:13 +00:00
int n, f[105], ans = 0;
string s[105];
2021-11-19 09:01:13 +00:00
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;
}