CSES Coin comb I TLE: why?

Правка en1, от bobbilyking, 2020-05-16 21:42:39

https://pastebin.com/zV3jsqy7

i did look at the CF editorial, and yeah my implementation (i don't think) is wrong. and someone else had the same TLE problem as me but he never said how he resolved it (if he ever did). Is this just a java thing? Editorial says that time complexity is n * target, which is 10^8 operations, so maybe I can make very very slight optimizations somewhere to get it under 1ms?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский bobbilyking 2020-05-16 21:42:39 432 Initial revision (published)