Блог пользователя Shudi

Автор Shudi, история, 7 лет назад, По-английски

Hello! I have been solving Div2 D problem from the latest contest ( It's just simply BFS ) and faced with one strange fact. When I use two arrays in my solution I got AC with 1700 ms or more — 31662651 and it's near the TL = 2000 ms. So, I decided to improve it and figured out that when I use only one array instead of two I got AC with 1388 ms — 31662579. So, you can see that it's almost there is no difference between them in memory, then where is my 300 ms? Thanks.

P.S. Feel free to post your answers on Russian too.

  • Проголосовать: нравится
  • +10
  • Проголосовать: не нравится

»
7 лет назад, # |
  Проголосовать: нравится -15 Проголосовать: не нравится

Those 300ms goes into allocating memory to the extra array.