Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.003 s | 0 KBi |
#2 |
Correcto
|
0.007 s | 0 KBi |
#3 |
Correcto
|
0.005 s | 2 KBi |
#4 |
Correcto
|
0.004 s | 1 KBi |
#5 |
Correcto
|
0.005 s | 0 KBi |
#6 |
Correcto
|
0.003 s | 0 KBi |
#7 |
Correcto
|
0.005 s | 1 KBi |
#8 |
Correcto
|
0.005 s | 1 KBi |
#9 |
Correcto
|
0.003 s | 0 KBi |
#10 |
Correcto
|
0.004 s | 0 KBi |
#11 |
Correcto
|
0.004 s | 0 KBi |
#12 |
Correcto
|
0.004 s | 67 KBi |
#include <bits/stdc++.h> using namespace std; bool solve(string s) { int mask = 0; for (auto x : s) { int pos = x - 'a'; if (mask & 1 << pos) return false; mask |= 1 << (pos); } return true; } int main () { string s; cin >> s; cout << (solve(s) ? "no" : "yes") << endl; return 0; }