need help in a different approach to Star sky problem

Правка en1, от unt311, 2021-06-14 23:43:08

I've rechecked my submission several times, but do not see anything wrong. (I'm getting WA on test 3) I checked the standings but couldn't find anyone doing it my way, so I'm stuck. I've read the tutorial and understand it fully, though I wish to know what went wrong with this approach.

what I'm doing is:

I store the brightness of the star at (x, y) for times t = 0 ... c in a[time][x][y]

The sum of brightness of stars at time t(between 0...c) upto (x, y) from (1, 1) in ps[time][x][y]

now, for queries: at time t, the sky would look same as what it looked at time t % (c + 1), as its given that brightness is periodic on c.

I get the answer from sum betweeen (x1, y1) and (x2, y2) of sky at time t % (c + 1)

Thanks in advance...

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский unt311 2021-06-14 23:45:03 0 (published)
en1 Английский unt311 2021-06-14 23:43:08 880 Initial revision (saved to drafts)