Horse Racing Duals puzzle discussion


#336

Maybe your algorithm is not optimized enough?


#337

Salut à tous! Je suis nouveau sur CG. Y’a des tests supplémentaires dans horse-racing, je ne sais pas comment les passer. Qcqn a une iddée?


#338

Hi there !

Is someone using Kotlin for this puzzle ?
I passed all the tests except the ‘huge’ ones…

It seems that I can’t even store the int in array without timeout.

this code :

 for (i in 0 until N) {
        //val pi = input.nextInt()
        lesdadas+= input.nextInt()
        
 }

without anything else make a timeout.
Is someone succeed in Kotlin?
thanks


#339

I wanted to make a liste with the pi
I putted
10. liste.append(pi)

but it doesnt work, I got the message
SyntaxError: Non-ASCII character ‘\xc3’ in file Answer.py on line 10, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

at Answer.py. not in a function on line 10

someone can explain ??


#340

Did you try to use a non-ASCII character in Python 2?


#341

what 's non ASCII character (sorry Im begginer)
Something like é, @ ??

No I didnt


#342

Ok I found the problem. It was because I putted : " # We create a liste ".
I delete it and it worked.
But I dont understand why…


#343

Nothing special in “# We create a liste” but maybe you printed an no-break space.


#344

I’ve used lists instead of arrays and it worked. This is the only difference between your algo and mine.


#345

Aaaaaaarg ! I just did it and it’s fine ! :slight_smile:
Thanks a lot !


#346

Hello , can i get the validator test by private message too. I am facing the same error for “Shorter difference on the first 2 horses”. Thanks