Yeah there is a constraint of 40 seconds per test set.
I too spent hours figuring it out. If you check the analysis section it
mentions the algo. can be made to run in O (R x C) time.
If u can incorporate those 2 optimisations you should be able to reduce the
execution time.
On Friday, 24 Apr
Thank it works for the first Test case now I have TLE for the second.
I don't understand how it changes something ?
Le jeudi 23 avril 2020 20:34:34 UTC+2, vijender ahlawat a écrit :
>
> Hi Quentin
>
> try changing score to long
>
> int score = 0;
>
> long score = 0;
>
> On Thursday, 23 April 2020
Hi Quentin
try changing score to long
int score = 0;
long score = 0;
On Thursday, 23 April 2020 21:21:39 UTC+5:30, Quentin wrote:
>
> Hello,
> I try to solve the Square Dance but I got WA even if on my local it is
> working.
> I tried the example use case and the following use case :
>
> 4 4 =