×

Battleship V

 0 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 56●1●4●12 accept rate: 0%

 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...:) answered 20 Jul '13, 17:10 4★kunal361 6.0k●13●32●72 accept rate: 21%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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