Codeforces и Polygon могут быть недоступны в период с 23 мая, 7:00 (МСК) по 23 мая, 11:00 (МСК) в связи с проведением технических работ. ×

Simple DP problem- TRIP

Правка en2, от sagar_is_dumb, 2018-04-22 10:13:33

I am trying to solve this problem on codechef https://www.codechef.com/problems/TRIP.

My code is :- https://ideone.com/ZgA0yr

I am not sure why am I getting TLE. Any help would be great.

P.S: Code is small to go through so please go through it if possible.

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский sagar_is_dumb 2018-04-22 10:13:33 4 Tiny change: 'f possible :P' -> 'f possible.'
en1 Английский sagar_is_dumb 2018-04-22 00:19:46 290 Initial revision (published)