Блог пользователя ddt

Автор ddt, 9 лет назад, По-английски

What should be the approach to find all paths with maximum flow? The graph is directed acyclic graph and the maximum number of nodes(vertices) in the graph can be 40 and edges around 80. Also, most of the edges have unit capacity.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

Автор ddt, 9 лет назад, По-английски

Help needed in the following problem :

There are N (1<=N<=200000) line segments (end-point coordinates are positive integers less than 1e9). The task is to merge the line segments that are overlapping and finally print the coordinates of all the merged line-segments.

Sample Test Case

N = 4
Line segments:
[(1,1) (5,1)]
[(4,1) (7,1)]
[(3,3) (9,3)]
[(5,3) (8,3)]

The answer for this test case would be :
[(1,1) (7,1)]
[(3,3) (9,3)]

My Approach : Consider each line segment as a vertex and make edges between segments U and V if U and V overlaps. Then, find the connected components. For each connected components, answer can be calculated by taking the min of left coordinates and maximum of right coordinates. But this approach is O(N^2) and will not work for N=200000.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

Автор ddt, 9 лет назад, По-английски

Can someone explain me how to solve this problem http://poj.org/problem?id=1927 If the length of rope is smaller than the perimeter of circle with radius equal to radius of inscribed circle, we can directly find the answer. But, how to deal with cases when length of the rope is greater than perimeter of such circle and less than perimeter of triangle.

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор ddt, 12 лет назад, По-английски

this contest is organised in techniche,annual technical fest of IIT GUWAHATI. the link to the contest is: http://www.codechef.com/BTCD2012/ Its duration is from 12 Aug to 26 Aug. Its got good mathematical problems which require your skills of beating the time. Enjoy and Code!!!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится

Автор ddt, 12 лет назад, По-английски

It was my first contest.As a beginner,it was quite challenging for me.The questions were great and thought provoking.Hope everyone enjoyed that. Thanking codeforces for organising such a fantastic contest. CODERS rock!!!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -18
  • Проголосовать: не нравится

Автор ddt, 12 лет назад, По-английски

I have just started using codeforeces and I am spell bound and totally i awe after seeing its interface.Its an awesome website for beginners, with the facility of seeing test cases enable the new programmers to find the bugs in their code. Codeforces rocks!!!

Полный текст и комментарии »

  • Проголосовать: нравится
  • +55
  • Проголосовать: не нравится