AlgorithmOJ
Problem
Local Problems
All Problems
Problem Category
Status
Contest
Standard Contests
Replay Contests
Virtual Contests
Ranklist
More...
News
About
F.A.Q
Recent Contests
Coming Soon...
Login
Register
2026-11-28 22:46:59
God’s cutter
Time Limit:
1000ms
Memory Limit:
32768KB
This problem will be judged on
HDU
. Original ID:
1726
64-bit integer IO format:
%I64d
Java class name:
Main
Prev
Submit
Status
Statistics
Next
Font Size:
Description
有一张长纸条, 上面写有n(0<n<=100)个大写字母, 它们或者是X, 或者是O.
现在需要将其剪成许多小长条, 使得每个小长条上的字串都关于其中心对称.
例如: O, XX, OXO, XOXXOX等. 求满足要求的最少剪裁次数.
Input
每行表示一组测试数据, 给出一个只包含O和X的字符串.
Output
对每组测试数据输出一个数, 表示最小剪裁次数.
Sample Input
XOOXO XXOXOO XOXOXOX
Sample Output
1 2 0
Source
HZIEE 2007 Programming Contest
Language:
C++
C++11
C++14
C
Java
Pascal
Python2
Python3
C#
Fortran
Perl
Ruby
Ada
SML
Visual C++
Visual C
CLang
CLang++
Theme:
Monokai
Solarized Light
Material
Share Code?
Yes
No
×
Login
Username:
Password:
Cookie:
Never
One Day
One Week
One Month
One Year
×
Register
Username:
Password:
Repeat Password:
Nickname:
School:
Email:
×
News Title
by