_klee_ @ 2023-07-29 22:53:28
为什么全都RE了呀!!
#include<iostream>
#include<string>
using namespace std;
int a[1005];
int main( )
{
int n,i;
string s;
cin>>s;
for(i=1;i<n;i++)
a[s[i]]++;
for(i=1;i<n;i++)
if(a[s[i]]==1)
{
cout<<s[i];
return 0;
}
cout<<"no";
return 0;
}
by ybc2025chenyuyang @ 2023-07-29 22:56:21
s是字符串,字符串怎么能做下标呢?
by _klee_ @ 2023-07-29 22:59:20
用阿四克马值桶排呀
by zsh_haha @ 2023-07-29 23:04:35
@xiaxiaoyu_2022
话说,你的
by zsh_haha @ 2023-07-29 23:05:28
@xiaxiaoyu_2022 还有 string 下标从
by _klee_ @ 2023-07-29 23:08:08
@zsh_haha .......(尴尬) 已经过啦,谢谢大佬
by zsh_haha @ 2023-07-29 23:10:19
@xiaxiaoyu_2022 不用谢的