Problem with Chef and Bipartite Graphs ICPC16F

acm-icpc

#1

I’m getting wrong answer for the problem Chef and Bipartite graphs ICPC16F. Can anybody provide input for which it will fail ?

Thanks in advance.

Question Link:
https://www.codechef.com/ACMIND16/problems/ICPC16F

Code Link:


#2

I too have same doubt.

CodeLink : http://ideone.com/hCe3oZ


#3

I have the same doubt.

Codelink: http://ideone.com/Gs0sbu


#4

I have serious doubt in this question.

Codelink: http://ideone.com/5lsRY7


#5

It gives correct output for all the above codes. Please run the codes and verify.


#6

@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.


#7

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


#8

@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.


#9

@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…


#10

I have the same problem with my code.

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

Code link : http://ideone.com/Tf3P1A

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


#11

@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).


#12

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


#13

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.


#14

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


#15

@nmalviya Try this case 100 10000 1 10

UPD-Sorry Wrong Case…


#16

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.


#17

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.


#18

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


#19

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


#20

My Solution