Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

EDITORIAL-Changed coordinates CRANIUM 2014

$
0
0

Level: Cakewalk

Concepts: Basic Geometry

Problem Link: http://www.codechef.com/CRNM2014/problems/CRANCRD

Johny measures the distance between P1(x1,y1) and P2(x2,y2) as : D(P1,P2) = |x1 - x2| + |y1 – y2|

A circle according to Johny's understanding will actually be a square with diagonals parallel to the x and y axes. Follow the second page of this doc for a pictorial explanation.

Hence the answer is 2*r^2.


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>