ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1324. Extra Spaces

What does it mean?
Posted by tbtbtb 26 Apr 2004 21:04
Re: What does it mean?
Posted by abc456 9 May 2004 15:09
这条题目可以简化为:一篇电子文档有,里面有一些的多余的连在一起的空格。求找出一种解决方案能用最少的次数处理来使得那些多个空格连在一起的变成一个。例如:假如这篇文章里最多的连在一起的空格数为22,那么其中之一的解决方案为6,3,2,2。也就是说:你第一次你是把每6个连在一起的格子变成一个,第二次你是把每3个格子连在一起的变成一个。。。。。。。、其中,假如有一个是7个格子连在一起的,则经过第一次处理(把6个连在一起的变成一个),那么它便变成了2个格子。。。。。。。。。。。。
Hey! Don't post in Chinese!
Posted by Vladimir Yakovlev (USU) 9 May 2004 16:41
Can I replace the sapce once? The example 22 sapces the first round ,I can use 22 space to replace them all?
Posted by Zhang Jin Jing 9 May 2004 17:07


Edited by author 06.08.2004 20:57
Re: Can I replace the sapce once? The example 22 sapces the first round ,I can use 22 space to replace them all?
Posted by simon25hk 7 Aug 2004 17:06
I also want to know. Can We just replace the spaces once and get the optimal ans ? If We can't ,  What is the spaces num limit we should assume?
If we replace 22 spaces at once than there can remain 21 spaces in the text (-)
Posted by Vladimir Yakovlev (USU) 8 Aug 2004 03:43
Re: If we replace 22 spaces at once than there can remain 21 spaces in the text (-)
Posted by tbtbtb 11 Aug 2004 10:04
Why?? I think it remains only 1 space...
See in
Posted by Vladimir Yakovlev (USU) 11 Aug 2004 15:23
Consider example:

text[21 spaces]text
text[22 spaces]text
text[23 spaces]text

after replacing 22 spaces with one, we get:

text[21 spaces]text
text[1 space]text
text[2 spaces]text

So, 21 spaces can remain in some place.