TLE in SPOJ problem BITMAP

Правка en1, от i_love_math, 2015-12-29 03:13:00

i am trying to solve http://www.spoj.com/problems/BITMAP/ problem.

my code is giving TLE on SPOJ .

i am not getting why it's getting TLE.

i approached in this procedure: I stored those pixels which have value 1 in a queue and applied bfs across these,

my code is http://ideone.com/ppgQiW

please help

thanks

Теги spoj

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский i_love_math 2015-12-29 03:13:00 352 Initial revision (published)