ama_teur's blog

By ama_teur, 11 years ago, In English

For practising segment trees I was trying the GSS1 problem of SPOJ. When I ran my code on SPOJ it failed on the 9th test case. After some debugging, i came up with test case 6 1 2 80 79 -90 -8 1 1 6

But results got worse *** glibc detected *** demo: free(): invalid next size (fast): 0x0000000002371510 ***

Can someone help me out with this error?

http://pastebin.com/6NSwEHHz Here is my code. Any help will be much appreciated.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By ama_teur, 11 years ago, In English

I have been stuck at this problem for quite sometime

http://mirror.codeforces.com/problemset/problem/234/G

I will be grateful if someone can assist me on this. I fail to understand how we to prove the optimality condition as well as how to enumerate the team configuration.

Thanks in advance.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By ama_teur, 12 years ago, In English

Can someone help me out with some links that will help me out with the methods of centroid decomposition and heavy light decomposition. Thanks in advance.

Full text and comments »

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