Caso # | Resultado | Tiempo | Memoria |
---|---|---|---|
#1 |
Correcto
|
0.004 s | 12 KBi |
#2 |
Correcto
|
0.006 s | 1 KBi |
#3 |
Correcto
|
0.005 s | 6 KBi |
#4 |
Correcto
|
0.003 s | 1 KBi |
#5 |
Correcto
|
0.004 s | 1 KBi |
#6 |
Correcto
|
0.004 s | 1 KBi |
#7 |
Correcto
|
0.386 s | 6 KBi |
#8 |
Correcto
|
0.293 s | 2 KBi |
#9 |
Correcto
|
0.172 s | 2 KBi |
#10 |
Correcto
|
0.264 s | 2 KBi |
#11 |
Correcto
|
0.271 s | 4 KBi |
#12 |
Correcto
|
0.206 s | 1 KBi |
#13 |
Correcto
|
0.308 s | 2 KBi |
#14 |
Correcto
|
0.299 s | 2 KBi |
#15 |
Correcto
|
0.304 s | 6 KBi |
#16 |
Correcto
|
0.38 s | 2 KBi |
#17 |
Correcto
|
0.145 s | 3 KBi |
#18 |
Correcto
|
0.132 s | 2 KBi |
#19 |
Correcto
|
0.136 s | 2 KBi |
#20 |
Correcto
|
0.206 s | 6 KBi |
#21 |
Correcto
|
0.2 s | 22 KBi |
#22 |
Correcto
|
0.21 s | 5 KBi |
#include <bits/stdc++.h> using namespace std; int main() { int i, len, max = -1; string str, left = "", right = ""; cin >> str; len = str.length(); for (i = 0; i < len - 1; i++) { left += str[i]; right.insert(0, 1, str[len - i - 1]); if (left == right) { if (i > max) { max = i; } } } cout << max + 1; }