PuzzlersWorld.com

  • Hacker Puzzle
  • Interview Puzzles
  • Number Puzzles
  • Maths Puzzles

Falling Diamonds Solution: Google codejam 2013 Round 1B

May 5, 2013 by puzzler Leave a Comment

Most of us are familiar with google codejam, those who don’t visit https://code.google.com/codejam for more information. This is the second problem from Online Round 1B 2013, top 1000 from this round will be eligible for next online round.

Problem Statement

Diamonds are falling from the sky. People are now buying up locations where the diamonds can land, just to own a diamond if one does land there. You have been offered one such place, and want to know whether it is a good deal.

Diamonds are shaped like, you guessed it, diamonds: they are squares with vertices (X-1, Y), (X, Y+1), (X+1, Y) and (X, Y-1) for some X, Y which we call the center of the diamond. All the diamonds are always in the X-Y plane. X is the horizontal direction, Y is the vertical direction. The ground is at Y=0, and positive Y coordinates are above the ground.

The diamonds fall one at a time along the Y axis. This means that they start at (0, Y) with Y very large, and fall vertically down, until they hit either the ground or another diamond.

When a diamond hits the ground, it falls until it is buried into the ground up to its center, and then stops moving. This effectively means that all diamonds stop falling or sliding if their center reaches Y=0.

When a diamond hits another diamond, vertex to vertex, it can start sliding down, without turning, in one of the two possible directions: down and left, or down and right. If there is no diamond immediately blocking either of the sides, it slides left or right with equal probability. If there is a diamond blocking one of the sides, the falling diamond will slide to the other side until it is blocked by another diamond, or becomes buried in the ground. If there are diamonds blocking the paths to the left and to the right, the diamond just stops.

falling diamonds problem google codejam round 1b 2013

falling diamonds problem google codejam round 1b 2013

Consider the example in the picture. The first diamond hits the ground and stops when halfway buried, with its center at (0, 0). The second diamond may slide either to the left or to the right with equal probability. Here, it happened to go left. It stops buried in the ground next to the first diamond, at (-2, 0). The third diamond will also hit the first one. Then it will either randomly slide to the right and stop in the ground, or slide to the left, and stop between and above the two already-placed diamonds. It again happened to go left, so it stopped at (-1, 1). The fourth diamond has no choice: it will slide right, and stop in the ground at (2, 0).
[Read more…]

Checkout more Interview Questions Tags: Difficult, Google codejam, Java, Solved Puzzles

Osmos Solution: Google codejam 2013 Round 1B

May 5, 2013 by puzzler Leave a Comment

Most of us are familiar with google codejam, those who don’t visit https://code.google.com/codejam for more information. This is the first problem from Online Round 1B 2013, top 1000 from this round will be eligible for next online round.

Problem Statement

Armin is playing Osmos, a physics-based puzzle game developed by Hemisphere Games. In this game, he plays a “mote”, moving around and absorbing smaller motes.

A “mote” in English is a small particle. In this game, it’s a thing that absorbs (or is absorbed by) other things! The game in this problem has a similar idea to Osmos, but does not assume you have played the game.

When Armin’s mote absorbs a smaller mote, his mote becomes bigger by the smaller mote’s size. Now that it’s bigger, it might be able to absorb even more motes. For example: suppose Armin’s mote has size 10, and there are other motes of sizes 9, 13 and 19. At the start, Armin’s mote can only absorb the mote of size 9. When it absorbs that, it will have size 19. Then it can only absorb the mote of size 13. When it absorbs that, it’ll have size 32. Now Armin’s mote can absorb the last mote.

Note that Armin’s mote can absorb another mote if and only if the other mote is smaller. If the other mote is the same size as his, his mote can’t absorb it.

You are responsible for the program that creates motes for Armin to absorb. The program has already created some motes, of various sizes, and has created Armin’s mote. Unfortunately, given his mote’s size and the list of other motes, it’s possible that there’s no way for Armin’s mote to absorb them all.

You want to fix that. There are two kinds of operations you can perform, in any order, any number of times: you can add a mote of any positive integer size to the game, or you can remove any one of the existing motes. What is the minimum number of times you can perform those operations in order to make it possible for Armin’s mote to absorb every other mote?

For example, suppose Armin’s mote is of size 10 and the other motes are of sizes [9, 20, 25, 100]. This game isn’t currently solvable, but by adding a mote of size 3 and removing the mote of size 100, you can make it solvable in only 2 operations. The answer here is 2.
[Read more…]

Checkout more Interview Questions Tags: Easy, Google codejam, Java, Solved Puzzles

Guess the actor and actresses

May 4, 2013 by puzzler 2 Comments

Guess the actor and actresses name from whatsapp emoticons and smileys

Guess the actor and actresses name from whatsapp emoticons and smileys

Guess the actor and actresses name from whatsapp emoticons and smileys

See AnswersHide Answers

Guess the actor and actresses name from whatsapp emoticons and smileys answers

  1. Ranbir Kapoor
  2. Jitendra
  3. Karishma
  4. Vidhya Balan
  5. Hrithik Roshan
  6. Dilip Kumar
  7. Sonakshi Sinha
  8. Sonam Kapoor
  9. Kajol
  10. Tushar Kapoor

Checkout more Picture Puzzles Tags: Guess Actors Names, Solved Puzzles, WhatsApp Emoticons

Guess the places names

May 4, 2013 by puzzler Leave a Comment

Guess the places names in india

These English words have indian city or state names in them

Can you guess those places names?

  1. Great Country

    Tried enough already?
  2. Royal Place

    Tried enough already?
  3. Mr. City

    Tried enough already?
  4. Rhythm of Eyes

    Tried enough already?
  5. Face

    Tried enough already?
  6. Unmarried Girl

    Tried enough already?
  7. No Zip

    Tried enough already?
  8. Come in Evening

    Tried enough already?
  9. Go and Come

    Tried enough already?
  10. Answer State

    Tried enough already?
  11. Make Juice

    Tried enough already?
  12. Do Drama

    Tried enough already?
  13. God door

    Tried enough already?
  14. Sea

    Tried enough already?
  15. Monk Hair

    Tried enough already?

Checkout more Riddles Tags: Guess, Guess Places Names, Solved Puzzles

Missing number in series #45

May 2, 2013 by puzzler 3 Comments

What is the missing number in this series

1,16,36,__,81,100,144

Tried enough already?
See SolutionHide Solution
Series is the square of non prime numbers, 12, 42, 62, 82, 92, 102, 122. these are square in sequence excluding the prime numbers 2,3,5,7 and 11. Thus the missing number in series should be 82=64.

Checkout more Number Puzzles Tags: Easy, Mathematical Puzzle, Series, Solved Puzzles

Peculiar two digit number #44

May 2, 2013 by puzzler 2 Comments

Peculiar two digit number

There is a peculiar two digit number which is three times the sum of its digits.
Can you find the number?

Tried enough already?
See SolutionHide Solution
Lets say the number is ab

ab = 3(a+b)
We can also write it as 
10a + b = 3*(a+b)
7a = 2b
a/b = 2/7

As it is given that it is a two digit number, so it can only be 27.

Checkout more Number Puzzles Tags: medium, Number, Solved Puzzles

How many eggs in the basket #43

May 2, 2013 by puzzler 3 Comments

How many eggs in the basket

A women was carrying a basket of Eggs when a passer-by bumped her and she dropped the basket and all the eggs broke, Passer-by asked her number of eggs to pay her. Women replied, I don’t remember exactly , but I do recall that whether I divided the eggs by 2,3,4,5 or 6 there was always one egg left over. When I took the eggs out in groups of seven, I emptied the basket.

Can you tell, “How many minimum number of Eggs were there in the basket”?

Tried enough already?
See SolutionHide Solution
As in the previous problem we should find the least common multiple of 2,3,4,5 and 6 first, i.e. 60.
Now the the number of eggs can be 60+1, but its not completely divisible by 7.
So next possibility is 120+1, but its not completely divisible by 7 too.
So next possibility is 180+1, but its not completely divisible by 7 too.
So next possibility is 240+1, but its not completely divisible by 7 too.
So next possibility is 300+1, and its completely divisible by 7, so the minimum number of eggs in the basket should be 301.

Checkout more Number Puzzles Tags: medium, Solved Puzzles

Boy with Toffee #42

April 30, 2013 by puzzler 2 Comments

Boy with Toffees

A boy has few toffees with him, then comes one of his friend and they decide to share them equally and they are able to divide them without any toffee remaining. Then one more friend comes and they divide the toffees in 3 equal parts, then one more friend comes, they are still able to divide the toffees in 4 equal parts, then comes one more friend, they are still able to divide them equally, similarly they are able to divide it equally in 5 and 6 equal parts but not when they are 7 and decide to divide equally they are left with one extra toffee.
Can you tell the minimum number of toffees boy had initially ?

Tried enough already?
See SolutionHide Solution
Since, They are able to divide the toffees equally between 2,3,4,5 and 6 boys so the number of toffees must be a multiple of all of these.
To get the minimum number we should first get the Least Common Multiple of 2,3,4,5 and 5, i.e. 2^2.3^1.5^1 = 60.
Now lets divide it by 7, the remainder is = 4, so it cant be the answer, So we should try the next possible answer i.e. 120, divide it by 7, remainder = 1, so minimum number of toffees boy can have is 120.

Checkout more Number Puzzles Tags: medium, Number, Puzzle, Solved Puzzles

Average Age Puzzle #41

April 28, 2013 by puzzler Leave a Comment

Average Age Puzzle

Average age of a 10 members committee is same as it was 4 years ago, because an old member is replaced by a younger member. What is difference between the younger member and the old member age.
Or in other words, how younger he is from his counterpart?

Tried enough already?
See solutionHide Solution
Lets say sum of the 10 members 4 years ago was S, now it should have been S+40. assume old member’s age was x(now) and younger members age is y(now).
S + 40 -x +y = S=> x -y = 40.

Checkout more Number Puzzles Tags: Easy, Solved Puzzles

9 digit number #46

April 27, 2013 by puzzler Leave a Comment

9 digit number puzzle

There is a 9 digit number. No digit are repeated and rightmost digit is divisible by 1 and right 2 digits is divisible by 2, right 3 digits is divisible by 3 and so on, finally the whole number is divisible by 9.

Can you find out the number?

See SolutionHide Solution
As the right two digits are divisible by 2, so rightmost digit should be even, at the same time right 5 digits are divisible by 5 so the rightmost digit can be 5 or 0, but as it should be even so it can only be 0.

Now, Right 4 digits are divisible by 4, so the rightmost two digits can be either 20, 40, 80 or 60.
To be divisible by 9 the digits of a number must sum to a multiple of 9. Adding the 10 digits together (0+1+2+…+8+9) gives 45 which is div by 9. However, this is a 9-digit number so we have to drop one from the ten. We can only take out 0 or 9 and still have the remaining digits sum to a multiple of 9. We’ve already shown that 0 is present so the 9 is dropped.
Right 3 digits are divisible by 3 so these 3 digits can be 120, 420, 720, 240, 540, 840, 180, 480, 780, 360.
Now to be divisible by 6 sum of the six digits should be divisible by 3 and it should also be even, which it is.

There is no rule for divisible by 7 so we just have to take digits such that they are divisible by 7, there can be many such numbers and one such number is 123567480.

Checkout more Number Puzzles Tags: Difficult, Number, Puzzle, Solved Puzzles

  • « Previous Page
  • 1
  • …
  • 69
  • 70
  • 71
  • 72
  • 73
  • …
  • 94
  • Next Page »
Submit your Puzzle

You may also like

    Categories

    • Aive hi Puzzles
    • Akbar and Birbal
    • Alphabetical Puzzles
    • Bollywood Puzzles
    • Google Code jam
    • Hindi Riddles
    • Interview Puzzles
    • Interview Questions
    • Logical Puzzles
    • Malayalam Puzzles
    • Maths Puzzles
    • Miscellaneous
    • Number Puzzles
    • Picture Puzzles
    • Riddles
    • Tamil Puzzles
    • Technical

    Social

    • View puzzlersworld’s profile on Twitter
    privacy policy

    Copyright © 2025 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in

    • Hacker Puzzle
    • Logo Puzzles
    • Optical Illusions
    • WhatsApp Puzzles
    • Picture Puzzles
    • Riddles
      ▼
      • Hindi Riddles
    • Bollywood Puzzles
    • Alphabetical Puzzles
    • Aive hi Puzzles
    • Interview Puzzles
    • Logical Puzzles
    • Interview Questions
      ▼
      • Data Structures
      • Binary Tree
      • Algorithms
      • Recursion Questions
      • Amazon Interview Questions
      • Snapdeal Interview Questions
      • Google Code jam
    • Technical
    • Akbar and Birbal
    • Number Puzzles
    • Maths Puzzles
    • Miscellaneous