yassin_'s blog

By yassin_, history, 3 years ago, In English

This is about 845B - Luba And The Ticket from educational round 27.

My code got AC for C++14 34715622 and TLE for C++11 34715609. Can anyone tell me why? Diagnostics also TLEs, so I couldn't use that to check for undefined behaviour.

Read more »

 
 
 
 
  • Vote: I like it
  • +14
  • Vote: I do not like it

By yassin_, history, 3 years ago, In English

I am stuck on this problem

Basically: p1 has N points, p2 has M points. They play N + M - 1 rounds. N, M ≤ 1000. The player who gets zero first loses.

p1 knows the probability of winning each round pi, the loser gets 1 point subtracted.

I can only think of dp in O((N+M)*N*M), but it gets TLE

my code

Any help is appreciated :)

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it