0_0_13469577_2952.cpp: In function 'bool judge(int, int)':
0_0_13469577_2952.cpp:2:97: error: 'str' was not declared in this scope
bool judge(int x, int y) { int i, k = (y - x + 1) / 2; for (i = 0; i < k; i++) if (str[x + i] != str[y - i])return false; return true;}
^
0_0_13469577_2952.cpp: In function 'int main()':
0_0_13469577_2952.cpp:3:23: error: 'M' was not declared in this scope
int main() { int f[M], n, i, j; while (scanf("%s", str) != EOF) { n = strlen(str); for (i = 0; i < n; i++) for (j = i; j < n; j++) { if (judge(i, j))map[i][j] = 1; else map[i][j] = 0; } f[0] = 0; for (i = 1; i < n; i++) { f[i] = oo; if (map[0][i])f[i] = 0; else { for (j = 0; j < i; j++) if (map[j + 1][i] && f[j] + 1 < f[i]) f[i] = f[j] + 1; } } printf("%d\n", f[n - 1]); } return 0;}
^
0_0_13469577_2952.cpp:3:58: error: 'str' was not declared in this scope
int main() { int f[M], n, i, j; while (scanf("%s", str) != EOF) { n = strlen(str); for (i = 0; i < n; i++) for (j = i; j < n; j++) { if (judge(i, j))map[i][j] = 1; else map[i][j] = 0; } f[0] = 0; for (i = 1; i < n; i++) { f[i] = oo; if (map[0][i])f[i] = 0; else { for (j = 0; j < i; j++) if (map[j + 1][i] && f[j] + 1 < f[i]) f[i] = f[j] + 1; } } printf("%d\n", f[n - 1]); } return 0;}
^
0_0_13469577_2952.cpp:3:94: error: 'strlen' was not declared in this scope
int main() { int f[M], n, i, j; while (scanf("%s", str) != EOF) { n = strlen(str); for (i = 0; i < n; i++) for (j = i; j < n; j++) { if (judge(i, j))map[i][j] = 1; else map[i][j] = 0; } f[0] = 0; for (i = 1; i < n; i++) { f[i] = oo; if (map[0][i])f[i] = 0; else { for (j = 0; j < i; j++) if (map[j + 1][i] && f[j] + 1 < f[i]) f[i] = f[j] + 1; } } printf("%d\n", f[n - 1]); } return 0;}
^
0_0_13469577_2952.cpp:3:196: error: 'map' was not declared in this scope
int main() { int f[M], n, i, j; while (scanf("%s", str) != EOF) { n = strlen(str); for (i = 0; i < n; i++) for (j = i; j < n; j++) { if (judge(i, j))map[i][j] = 1; else map[i][j] = 0; } f[0] = 0; for (i = 1; i < n; i++) { f[i] = oo; if (map[0][i])f[i] = 0; else { for (j = 0; j < i; j++) if (map[j + 1][i] && f[j] + 1 < f[i]) f[i] = f[j] + 1; } } printf("%d\n", f[n - 1]); } return 0;}
^
0_0_13469577_2952.cpp:3:231: error: 'map' was not declared in this scope
int main() { int f[M], n, i, j; while (scanf("%s", str) != EOF) { n = strlen(str); for (i = 0; i < n; i++) for (j = i; j < n; j++) { if (judge(i, j))map[i][j] = 1; else map[i][j] = 0; } f[0] = 0; for (i = 1; i < n; i++) { f[i] = oo; if (map[0][i])f[i] = 0; else { for (j = 0; j < i; j++) if (map[j + 1][i] && f[j] + 1 < f[i]) f[i] = f[j] + 1; } } printf("%d\n", f[n - 1]); } return 0;}
^
0_0_13469577_2952.cpp:3:266: error: 'f' was not declared in this scope
int main() { int f[M], n, i, j; while (scanf("%s", str) != EOF) { n = strlen(str); for (i = 0; i < n; i++) for (j = i; j < n; j++) { if (judge(i, j))map[i][j] = 1; else map[i][j] = 0; } f[0] = 0; for (i = 1; i < n; i++) { f[i] = oo; if (map[0][i])f[i] = 0; else { for (j = 0; j < i; j++) if (map[j + 1][i] && f[j] + 1 < f[i]) f[i] = f[j] + 1; } } printf("%d\n", f[n - 1]); } return 0;}
^
0_0_13469577_2952.cpp:3:327: error: 'oo' was not declared in this scope
int main() { int f[M], n, i, j; while (scanf("%s", str) != EOF) { n = strlen(str); for (i = 0; i < n; i++) for (j = i; j < n; j++) { if (judge(i, j))map[i][j] = 1; else map[i][j] = 0; } f[0] = 0; for (i = 1; i < n; i++) { f[i] = oo; if (map[0][i])f[i] = 0; else { for (j = 0; j < i; j++) if (map[j + 1][i] && f[j] + 1 < f[i]) f[i] = f[j] + 1; } } printf("%d\n", f[n - 1]); } return 0;}
^
0_0_13469577_2952.cpp:3:346: error: 'map' was not declared in this scope
int main() { int f[M], n, i, j; while (scanf("%s", str) != EOF) { n = strlen(str); for (i = 0; i < n; i++) for (j = i; j < n; j++) { if (judge(i, j))map[i][j] = 1; else map[i][j] = 0; } f[0] = 0; for (i = 1; i < n; i++) { f[i] = oo; if (map[0][i])f[i] = 0; else { for (j = 0; j < i; j++) if (map[j + 1][i] && f[j] + 1 < f[i]) f[i] = f[j] + 1; } } printf("%d\n", f[n - 1]); } return 0;}
^
|