Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99065 | 杨一诺 | 只出现一次的字符 | C++ | Accepted | 9 MS | 488 KB | 445 | 2024-11-24 11:09:10 |
#include<bits/stdc++.h> using namespace std; string a,b; int c; int zml[26]; string zm="abcdefghijklmnopqestuvwxyz"; int main(){ cin>>a; c=a.find(b); for(int i=0;i<(a.size());i++){ for(int j=0;j<27;j++){ if(zm[j]==a[i]){ zml[j]++; } } } for(int i=0;i<(a.size());i++){ for(int j=0;j<27;j++){ if(zm[j]==a[i]&&zml[j]==1){ cout<<zm[j]; return 0; } } } cout<<"no"; return 0; }