Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Incorrecto
|
0.005 s | 1 KBi |
#2 |
Incorrecto
|
0.006 s | 3 KBi |
#3 |
Incorrecto
|
0.004 s | 4 KBi |
#4 |
Incorrecto
|
0.005 s | 0 KBi |
#5 |
Incorrecto
|
0.004 s | 1 KBi |
#6 |
Incorrecto
|
0.005 s | 0 KBi |
#7 |
Incorrecto
|
0.005 s | 2 KBi |
#8 |
Incorrecto
|
0.004 s | 1 KBi |
#9 |
Incorrecto
|
0.005 s | 3 KBi |
#10 |
Incorrecto
|
0.006 s | 1 KBi |
#11 |
Incorrecto
|
0.004 s | 3 KBi |
#12 |
Incorrecto
|
0.004 s | 1 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; } cout << "i = " << text[i]; cout << "i+1 = " << text[i+1]; } if (repeated) { cout << "yes" << endl; } else { cout << "false" << endl; } return 0; }