UCL : Wrong Answer

help
c
wrong-answer

#1

Hi,
The following code https://www.codechef.com/viewsolution/23729171 seems to give correct output on codechef ide, still on submission online judge says wrong answer. Can’t get what is wrong. Can someone point out the mistake pls.


#2

Figured it out. Answer was coincidentially coming right for input dataset given for the problem. Problem was in if else nest within main(). It should be :
if (team1score > team2score)
{
team1points = 3;
team2points = 0;
}
else if (team1score == team2score)
{
team1points = 1;
team2points = 1;
}
else
{
team1points = 0;
team2points = 3;
}
Those who wish to see my correct and better solution follow this link:https://www.codechef.com/viewsolution/23750050