Блог пользователя vivekcrux

Автор vivekcrux, история, 5 лет назад, По-английски

Can anyone suggest how can I approach this problem:-
https://www.codechef.com/FFC22019/problems/FFC219A
I have looked at few submissions, most of them are using the similar type of approach, but I'm not able to understand the concept behind it. Any help is appreciated.

  • Проголосовать: нравится
  • -8
  • Проголосовать: не нравится

»
5 лет назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

It was a copied question from codeforces. Just take a look at this:-
https://codeforces.com/contest/622/problem/F .
Look at it's editorial if you want the slution approach.

»
5 лет назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I tried lagrange interpolation (see geeksforgeeks or CP algorithm), as a similar problem appeared some months back in a long challenge(June challenge, 2019 i believe, div.1 6th problem), but to no avail as I couldn't get rid of TLE due to such tight constraints.... :(