Understanding codeforces problem Football Season

Problem link: https://codeforces.com/problemset/problem/1244/C

Question 1.

In the video, at 5:38 we get y%w’ = (p’ % w’)/(d’ % w’) which means y < w , but how do we know that y < w ?

Question 2.

How the below statement from the codeforces editorial(https://codeforces.com/blog/entry/70553) is true? It is not clear to me.

“The crucial observation is that d wins give us the same amount of points as w draws”

Help please

@apaarkamal @KartikKhariwal @mr.encoder can you please help here?

hello @thirumeni.m07
you have reopned this doubt.
do u still need any help?

Hi Aman… Yes I still do because as you can see my questions still remain unanswered.
Can you please answer my questions?

he did a mistake here.

the equation must be this only -> y%w’ = (p’ % w’)/(d’ % w’) so to simply it furthur we can do one thing that if y>=w then we can subtract w from from y and add d to x (to make sure y<w). and this way we can remove %w from y.

points u will get after d wins is d * w right?
points u will get after w draws is w*d right ?
both are same. this is what they are saying

Do you mean we can keep on subtracting w from y and adding d to x till y becomes less than w?

Now, I understood this. Yes they are same which means we can subtract w from y and add d to x to make sure the total points remain the same? right?

yeah that is what i want to say.

right . . . . .

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.