F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

God’s cutter

Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 440    Accepted Submission(s): 195


Problem 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
 

Author
LL
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 17:13:46, Gzip enabled