hereicomewf's blog

By hereicomewf, history, 9 years ago, In English
  • Vote: I like it
  • -2
  • Vote: I do not like it

By hereicomewf, history, 9 years ago, In English

Can anyone explain the solution to this question ? http://acm.hdu.edu.cn/showproblem.php?pid=4253

Full text and comments »

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

By hereicomewf, 9 years ago, In English

Could someone guide me for preparing for ICPC regionals. I find myself lost on how to progress. Just need some guidance :) .

Full text and comments »

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

By hereicomewf, 10 years ago, In English

I was trying to solve This Problem on Spoj.

The problem is to find the sum of all divisors of i where i=1 to i=N.

We have to solve this in sqrt(n) complexity.

This is the Ac'ed python Code, I couldn't figure out the logic behind this.

Please provide me with some hints..Thanks

Full text and comments »

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

By hereicomewf, 10 years ago, In English

Problem Link

My solution

My approach:

I applied Binary search on Mean(i.e answer to be found) and assigned weight of each edge equal to [Val-Mid] (Val is the value of each egde in the initial graph and Mid is the present Value of Mean during the binary search).

For each Mid in binary search I applied Bellman ford to check if any negative value cycle exists. I am constantly getting WA.(i even tried floyd for negative cycle detection).

Any help is appreciated.

Full text and comments »

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

By hereicomewf, 10 years ago, In English
  • Vote: I like it
  • 0
  • Vote: I do not like it

By hereicomewf, 10 years ago, In English

How to solve this problem on Convex hull? http://poj.org/problem?id=1294

Full text and comments »

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