NEED HELP IN PROBLEM 734D using ORDER STATISTICS SET

Revision en1, by javacoder1, 2016-11-30 21:49:13

PLEASE DO NOT GIVE NEGATIVE VOTES . IF YOU ARE NOT WILLING TO HELP PLEASE IGNORE IT

Here i tried to maintain 4 order statistics set with value compresses be coordinate compression , one for row , one fo column ,one for additive sum of coordinates and one for the absolute difference of coordinates . Then to check whether a particular piece can attack the white piece in one move i am checking the domain in which they are identical ( 4 domains as defined above ) and then using pbds whcih is basically a set with additional functionalities i am checking the number of objects between cells . My code is passing on small cases but failing o test 5 . Can someone point the flaw in my approach ?? Thanks in advance

Code : http://codeforces.net/contest/734/submission/22629567

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English javacoder1 2016-11-30 21:49:13 838 Initial revision (published)