Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.005 s | 0 KBi |
#2 |
Incorrecto
|
0.001 s | 0 KBi |
#3 |
Incorrecto
|
0.005 s | 0 KBi |
#4 |
Incorrecto
|
0.004 s | 1 KBi |
#5 |
Incorrecto
|
0.005 s | 0 KBi |
#6 |
Correcto
|
0.004 s | 1 KBi |
#7 |
Correcto
|
0.006 s | 20 KBi |
#8 |
Correcto
|
0.004 s | 0 KBi |
#9 |
Correcto
|
0.001 s | 0 KBi |
#10 |
Correcto
|
0.005 s | 0 KBi |
#11 |
Correcto
|
0.005 s | 0 KBi |
#12 |
Correcto
|
0.006 s | 16 KBi |
#include <iostream> #include <cassert> using namespace std; int main() { string text; int textLenght = 50; cin >> text; assert(text.length() <= textLenght); bool repeated = false; for (int i = 0; i <= text.length(); i++) { if (text[i] == text[i+1]) { repeated = true; } } if (repeated) { cout << "yes" << endl; } else { cout << "false" << endl; } return 0; }