H3X's blog

By H3X, 12 years ago, In English

Suppose you have two operations : 1 ADD L R x, add from L to R value x 2 SUM L R, get the sum from L to R.

How can you implement these using any typical BST like treap or splay tree?

Full text and comments »

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

By H3X, 12 years ago, In English

Can anyone share a method or an idea to find lexicographically smallest minimum cut in a graph.

http://en.wikipedia.org/wiki/Minimum_cut

Full text and comments »

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

By H3X, 12 years ago, In English

http://codeforces.net/contest/136/submission/3133932

It outputs 10 on my pc but judge says it outputs 0, for the 2nd test case.

Any help?

Full text and comments »

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