题解:B4569 [合肥市初中组 2025 T1] 字母
本题题意:
本题就是让你输出 中没有出现过的大写字母,如果没有则输出 。
思路:
不妨用一个 map 容器来存储出现过的单词,对于没出现过的单词则输出即可。
CODE:
#include<bits/stdc++.h>
using namespace std;
int n;
string s;
bool flag=true;
map<char,bool>mp;
int main(){
cin>>n>>s;
for(char i:s)mp[i]=true;
for(int i=0;i<26;i++)if(!mp[i+'A']){cout<<char(i+'A');flag=false;}
if(flag)cout<<"-1";
return 0;
}