Search found 37 matches

Wed Apr 22, 2009 1:55 am
Forum: Volume 115 (11500-11599)
Topic: 11594 - All Pairs Maximum Flow
Replies: 2
Views: 1445

Re: 11594 All Pairs Maximum Flow

This problem can be solved by using the "Gomory - HU Tree of minimum cuts" algorithm, you can google for
Wed Apr 01, 2009 4:00 am
Forum: ACM ICPC Archive Board
Topic: 4408
Replies: 5
Views: 3617

Re: 4408

Oh!! I think i make a big mistake... i transform the problem to the coin change one and solve it by DP... But due to the cyclic property, i can't always find the best solution :( ... I was too fool to make this mistake orz... and thank you very much!!! :) By the way, your blog is very usefull and a ...
Tue Mar 31, 2009 11:42 pm
Forum: ACM ICPC Archive Board
Topic: 4408
Replies: 5
Views: 3617

Re: 4408

Hi! Could you explain it clearly? I has a bottleneck in how to check the halting condition...because such as the third test case
5234 -> 1212, should i check 5234 -> 11212 -> 21212 -> 31212 -> ... ? By the way, Thank for your reply
Tue Mar 31, 2009 2:36 pm
Forum: ACM ICPC Archive Board
Topic: 4408
Replies: 5
Views: 3617

4408

Can someone tell me how to solve this problem with the correct algorithm? I saw many people solve this problem,
Sun Mar 08, 2009 7:46 am
Forum: ACM ICPC Archive Board
Topic: live archive 4267 - Finding The Heaviest Path
Replies: 0
Views: 1784

live archive 4267 - Finding The Heaviest Path

Could someone help me with the problem??? I always got WA (about 50 times...) ! Could someone help me with my code? please :( #include <iostream> #include <vector> #include <algorithm> #include <cstdio> #include <cstdlib> #include <memory.h> #define MAX 10010 using namespace std; int root, N, ansnum...
Sun Mar 01, 2009 4:07 am
Forum: Volume 115 (11500-11599)
Topic: 11584 - Partitioning by Palindromes
Replies: 14
Views: 3918

Re: 11584 - Partitioning by Palindromes

Could someone give me a hint how to use a O(N^2) DP to solve this problem? I use a N^3 with TLE.
Sat Feb 28, 2009 1:54 am
Forum: Volume 115 (11500-11599)
Topic: 11581 - Grid Successors
Replies: 8
Views: 3450

Re: 11581 - Grid Successors

Thank you!! I think this problem will always convergence to the zero matrix (3x3) for every grid, but i can't prove this. Actually my AC program shows the
feature.
Sat Feb 28, 2009 1:45 am
Forum: Volume 115 (11500-11599)
Topic: 11579 - Triangle Trouble
Replies: 20
Views: 10542

Re: 11579 - Triangle Trouble

Hey! Finally i got AC, the mistake is that we should check each triple in the sorting sequence...
such as: 1 2 3 4 5 (index of decreasing order) => check (1,2,3) (2,3,4) (3,4,5), my original program will break if find a legal area which will be wrong!!

And thank all of your replay for my question
Fri Feb 27, 2009 2:32 pm
Forum: Volume 115 (11500-11599)
Topic: 11579 - Triangle Trouble
Replies: 20
Views: 10542

Re: 11579 - Triangle Trouble

After i change the signal to %Lf, i still got WA...
Fri Feb 27, 2009 12:00 pm
Forum: Volume 115 (11500-11599)
Topic: 11581 - Grid Successors
Replies: 8
Views: 3450

11581 - Grid Successors

I think this problem can't be a cycle...but why??? Can someone give me a proof please
Fri Feb 27, 2009 11:28 am
Forum: Volume 115 (11500-11599)
Topic: 11579 - Triangle Trouble
Replies: 20
Views: 10542

11579 - Triangle Trouble

Could someone help me with the problem? i got WA many times... :evil: My algorithm is to sort the sides in increasing order and using heron's formula to calculate the area. I think there can be precise error and overflow, so i use long double, is anything wrong?? Please help me :( Deleted after AC
Sat Feb 21, 2009 5:53 am
Forum: Volume 114 (11400-11499)
Topic: 11439 - Maximizing the ICPC
Replies: 4
Views: 3085

Re: 11439 - Maximizing the ICPC

How to reduce the problem into a edmon blossom? this graph has weight... i think it is a minimum weight perfect matching in a complete graph..
Am i wrong ?? or could somone give me a hint
Sun Feb 15, 2009 1:44 am
Forum: Volume 115 (11500-11599)
Topic: 11572 - Unique Snowflakes
Replies: 36
Views: 13228

11572 - Unique Snowflakes

Hey! i got AC use a O(nlogn) algorithm.. i want to know if there is a O(N) algorithm for solving this problem ?
Sun Feb 15, 2009 1:37 am
Forum: Volume 115 (11500-11599)
Topic: 11574 - Colliding Traffic
Replies: 1
Views: 924

11574 - Colliding Traffic

Could someone tell me how to solve the problem ? i increment the time one by one to check in which time they will get collision...
but TLE... is there a better algorithm for solveing this problem??
Tue Feb 03, 2009 3:01 pm
Forum: Volume 114 (11400-11499)
Topic: 11492 - Babel
Replies: 18
Views: 10771

Re: 11492 - Babel

Could someone plz explain how to solve this problem using dijkstra?? I can't figure out how to process the multiple edge cost...