Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.005 s | 18 KBi |
#2 |
Correcto
|
0.005 s | 9 KBi |
#3 |
Correcto
|
0.004 s | 49 KBi |
#4 |
Correcto
|
0.004 s | 5 KBi |
#5 |
Correcto
|
0.005 s | 67 KBi |
#6 |
Correcto
|
0.005 s | 4 KBi |
#7 |
Correcto
|
0.004 s | 9 KBi |
#8 |
Correcto
|
0.005 s | 1 KBi |
#9 |
Correcto
|
0.004 s | 1 KBi |
#10 |
Correcto
|
0.003 s | 16 KBi |
#11 |
Correcto
|
0.004 s | 31 KBi |
#12 |
Correcto
|
0.004 s | 2 KBi |
#include <iostream> #include<vector> using namespace std; int main() { vector<int> letter(25,0); string chain;cin>>chain; for(int i=0;i<chain.size();i++){ letter[chain[i]-'a']+=1; } for(int i=0;i<25;i++){ if(letter[i]>1){ cout<<"yes"<<endl; return 0; } } cout<<"no"<<endl; return 0; }