Showing posts with label Volume CIX. Show all posts
Showing posts with label Volume CIX. Show all posts

Solution of 10970 - Big Chocolate

Problem Description
source:https://uva.onlinejudge.org/external/109/10970.html

Mohammad has recently visited Switzerland. As he loves his friends very much, he decided to buy some chocolate for them, but as this fine chocolate is very expensive (You know Mohammad is a little BIT stingy!), he could only afford buying one chocolate, albeit a very big one (part of it can be seen in figure 1) for all of them as a souvenir. Now, he wants to give each of his friends exactly one part of this chocolate and as he believes all human beings are equal (!), he wants to split it into equal parts. 

Solution of 10945 - Mother bear

Problem Description
source:https://uva.onlinejudge.org/external/109/10945.html

Unforunately for our lazy “heroes”, the nuts were planted by an evil bear known as.. Dave, and they’ve fallen right into his trap. Dave is not just any bear, he’s a talking bear, but he can only understand sentences that are palindromes. While Larry was dazed and confused, Ryan figured this out, but need a way to make sure his sentences are palindromic. So he pulled out his trustly iPod, which thankfully have this program you wrote just for this purpose... or did you?

Solution of 10940 - Throwing cards away II

Problem Description
source:https://uva.onlinejudge.org/external/109/10940.html


Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as there are at least two cards in the deck: 
     Throw away the top card and move the card that is now on the top of the deck to the bottom of the deck. 
     Your task is to find the last, remaining card. 

Solution of 10935 - Throwing cards away I

Problem Description
source:https://uva.onlinejudge.org/external/109/10935.html

Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as there are at least two cards in the deck: 

     Throw away the top card and move the card that is now on the top of the deck to the bottom of the deck. 
     Your task is to find the sequence of discarded cards and the last, remaining card. 

Input 

Solution of 10921 - Find the Telephone

Problem Description
source:https://uva.onlinejudge.org/external/109/10921.html

In some places is common to remember a phone number associating its digits to letters. In this way the expression “MY LOVE” means 69 5683. Of course there are some problems, because some phone numbers can not form a word or a phrase and the digits 1 and 0 are not associated to any letter. Your task is to read an expression and find the corresponding phone number based on the table below. An expression is composed by the capital letters (A-Z), hyphens (-) and the numbers 1 and 0.