Nakagawa.Kanon's blog

By Nakagawa.Kanon, history, 4 months ago, In English,

Lately I've been submitted codes to Building Skyscrapers. You don't have to understand my code but to better explanation, my first idea is to use unordered set and map to reduce first half of the solutions to $$$O(N)$$$ but it got TLE : 57946506. I've managed to submit again and get 100pt just by get rid of the ordered set (still use the unordered map) and running time reduce from > 3500ms to 2589 ms : 57994251. Finally, I get rid of both of them and just sort the whole vector and use the two pointer in $$$O(NlgN)$$$, the time reduced to 655 ms : 58085217.

I believed there is something wrong with the default hash function. Can anyone improve it ?

Read more »

 
 
 
 
  • Vote: I like it
  • -24
  • Vote: I do not like it

By Nakagawa.Kanon, history, 8 months ago, In English,

GCJ platform 2018 Is this site closed ? Can anyone access it ?

Read more »

 
 
 
 
  • Vote: I like it
  • +3
  • Vote: I do not like it

By Nakagawa.Kanon, history, 16 months ago, In English,

Recently I've been submited some pratice code to solve the Edgy Baking problem of Google code jam but there always are some error in my output, even thought the difference never exceed 0.01 as I've tested some random input. Can someone please check it ? https://pastebin.com/526V81qR

Read more »

 
 
 
 
  • Vote: I like it
  • 0
  • Vote: I do not like it