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 1053. Pinocchio

No matter how to choose blanks
Posted by Fokysnik 6 Aug 2006 19:00
Confusing question: HOW ARE THE BLANKS CHOSEN?

Let's see example
2 3 4 - initial blanks
I choose blanks 2 and 4 - they are different so I cut off piece of length 2 from the long blank (4).
After that we have blanks: 2 3 2 - two blanks coincide so one is eliminated: 2 3 they are different so we cut of blank with length 3. We have: 2 1. Cut again we have 1 1. Eliminate one blank and we get a result - 1.

You may try other ways to choose blank - but you will get same answer. So,
NO MATTER HOW TO CHOOSE 2 blanks.

Moral: What is not said does not matters ;)

By the way algorithm is very very easy... try to think
No subject
Posted by Nikolay 4 Oct 2010 16:50
Captain Obvious

Edited by author 04.10.2010 16:51