Tanmoy1228's blog

By Tanmoy1228, 9 years ago, In English

problem: (http://www.spoj.com/problems/MATSUM/)

code: (http://ideone.com/4cPZi4)

Verdict: WA

can not get why WA.

please help...

  • Vote: I like it
  • +9
  • Vote: I do not like it

»
9 years ago, # |
  Vote: I like it +11 Vote: I do not like it

Mistake is in 51-th line — value of ans calculated wrong. It should be ans=quary(x1+1,y1+1)-quary(x1,y1+1)-quary(x1+1,y1)+quary(x1,y1);