You are not logged in. Please login at www.codechef.com to post your questions!

×

Battleship V

http://www.codechef.com/problems/B3 I am stuck with this prob but i can't figure out. Can someone has explanation for this. Thnks

asked 20 Jul '13, 16:37

amanjain110893's gravatar image

4★amanjain110893
561412
accept rate: 0%


I thinkthe problem says that....if ur cannon is at origin and u need to destroy a cannon at a pt X,Y then the line joining 0,0 and X,Y should not pass through a point whose "x" and "y" coordinates are integers!!!!

for eg line joining 0,0 and 2,2 passes through 1,1 so cannon at 2,2 cannot be destroyed...whereas line joining 0,0 and 2,1 does not pass through any such points whose x as well y coordinates are integers...so cannon at 2,1 can be destroyed...hope this helps...:)

link

answered 20 Jul '13, 17:10

kunal361's gravatar image

4★kunal361
6.0k133272
accept rate: 21%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,424
×477

question asked: 20 Jul '13, 16:37

question was seen: 855 times

last updated: 20 Jul '13, 17:10