Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.004 s | 0 KBi |
#2 |
Incorrecto
|
0.004 s | 6 KBi |
#3 |
Incorrecto
|
0.003 s | 0 KBi |
#4 |
Incorrecto
|
0.005 s | 37 KBi |
#5 |
Incorrecto
|
0.007 s | 18 KBi |
#6 |
Incorrecto
|
0.004 s | 15 KBi |
#7 |
Incorrecto
|
0.004 s | 59 KBi |
#8 |
Incorrecto
|
0.003 s | 0 KBi |
#9 |
Incorrecto
|
0.005 s | 65 KBi |
#10 |
Incorrecto
|
0.004 s | 35 KBi |
#11 |
Incorrecto
|
0.003 s | 5 KBi |
#12 |
Incorrecto
|
0.007 s | 9 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; }