| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 135694 | 田子熙 | 只出现一次的字符 | C++ | Compile Error | 0 MS | 0 KB | 348 | 2025-11-08 11:28:43 |
#include<bits/stdc++.h> using namespace std; int a[125]; int main(){ string s; cin>>s; for(int i=0;i<s.length();i++){ a[s[i]]++; } int min=2e5; for(int i=97;i<=122;i++){ if(a[i]==1){ if(min>s.find(char(i))){ min=s.find(char(i)); } } } if(a==2e5){ cout<<"no"; }else{ cout<<s[min]; } return 0; }
Main.cc: In function 'int main()':
Main.cc:7:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0;is.find(char(i))){
^
Main.cc:18:8: error: invalid operands of types 'int [125]' and 'double' to binary 'operator=='
if(a==2e5){
^