Problem with Chef and Bipartite Graphs ICPC16F

@nmalviya1929 I couldn’t figure out a failing test case but your code will definitely give a TLE for large subtasks (n=100,m=10000) as it uses slow I/O operations.

Why are they not opening question for practice???.If anyone knows where they are,Please tell me the link…

@ankesh18 The time limit for the problem was 2 seconds and using 10^6 I/O operations will never give TLE verdict. Further I was getting WA Verdict not TLE.

1 Like

@codelover_ug Your code is giving wrong answer for “1 2 1 3”.Your code gives output as -1 but that should not be instead there exists a valid bipartite matching for that case…

I have the same problem with my code.

Can anyone please help, why my code is giving WA.

Code link : Tf3P1A - Online C++0x Compiler & Debugging Tool - Ideone.com

Can it be the case that the checker function of codechef for this question is incorrect?? @admin

1 Like

@ankesh18 Both the loop runs till cnt!=m, so total number of operation will be m and hence it will not give TLE. Time complexity of @nmalviya1929 's code is O(T*m).

1 Like

I got a WA too, and I cannot figure out a case where it would fail,

Can we have this problem rejudged once cases are corrected ? @admin

5 Likes

it took 20 mins for knowing whether our solution for this problem was right or wrong , submitted at 9:30 and got to know the “wrong” verdict at 9:50 with 10 mins left, didn’t expect such carelessness from codechef for this contest.

your solution is wrong. u also have to take care not to assign degree more than D. i see that u haven’t taken care of that. @nmalviya

@nmalviya Try this case 100 10000 1 10

UPD-Sorry Wrong Case…

guys,most of you have made same mistake.you all are printing edges and then checking the condition.
@nmalviya Try this:
1 0 0 1
your output is 1 1.but no. of edges to be printed is 0.
hope this helps.

Yes, I have the same doubt.

Rejudging solutions still doesn’t give us the time we would have got “during” the contest.

Not to mention those 10 minutes of “running” for each supposedly wrong submission.

So many faults while hosting such an important contest is simply not justified.

4 Likes

Did u guys handle the case when m=0 and n=0?? Even I couldn’t figure it out until the contest finished. :frowning:

@jainy6
According to the constraints given in the question n >= 1

My Solution

Oh ya @mohitbindal644. Didn’t see that… And I’m again badly curious for the reason y I got WA.

I just don’t know what people at Codechef office are happy about.
Reference: Redirecting...

There servers weren’t ready to take the load of the high submission rate but still they went for the Common Online Test. My team was logged out 9-10 times due to session limit and the submission’s were in Queue for more than 20 minutes. It’s just frustating.

@ankesh18 It is giving WA instead of TLE.

@naksh9619
d and D should be less than equal to n to make a valid bipartite graph.
1 2 1 3 is not valid input.

2 Likes

further m<=n*n condition is also not satisfied in your case.