Algorithm of 11498 - Division of Nlogonia

Problem Description Link
Algorithm:

This is a simple problem just you need to read carefully .
However you can follow this technique to solve this problem.

let x & y is division point . and m and n is that point tha
you want to determine .
so condition are below
if x=m then it determine y axis.
if y=n then it determine x axis.
if x<m and y<n then it determine north est site(NE).
if m<x and y<n then it determine north west site(NO).
if m<x and n<y the it derermine south west site(SO).
if x<m and n<y the it determine south est site(SE).
image

No comments:

Post a Comment

Write your comment - Share Knowledge and Experience