华为出的比赛?
好像是全站首个题解哎!
比赛链接:ABC342
稍微有点含金量的签到题。
#include <bits/stdc++.h>
using namespace std;
int main(){
string S;
cin>>S;
for(int i=0;i<s.size();i++){
if(count(S.begin(),S.end(),S[i])==1){//数有多少个字符
cout<<find(S.begin(),S.end(),S[i])-S.begin()+1<<endl;//找它的位置
return 0;
}
}
}
依然是签到题。
#include <bits/stdc++.h>
using namespace std;
int P[105];
int main(){
int N;
cin>>N;
for(int i=0;i<