I am not sure whether I understand the task correctly....
Could you tell me whet is the output for this test case :
Thanks in advance2 2
10 10
10 10
10 10 3
1 1 1
Moderator: Board moderators
Thanks in advance2 2
10 10
10 10
10 10 3
1 1 1
Yes, I found that for problem says N >= M.coolbila wrote:No, one envelope can appear just one time
my AC program for this input is
Case #1
cannot buy
this is a matching problem but no need to use maximum flow
You can use max flow or bipartite match but you don't need to. Since N <= 5 and M <= 10LittleJohn wrote:Yes, I found that for problem says N >= M.coolbila wrote:No, one envelope can appear just one time
my AC program for this input is
Case #1
cannot buy
this is a matching problem but no need to use maximum flow
But I have a question, that we can determine if an answer exists or not by maximum flow.
Besides that, how can we derive the best answer without brute-force search?
Or it's an NP problem?
p.s. thanks for gvcormac