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

Автор karthiksing05, история, 22 месяца назад, По-английски

Been looking for some more functional graph problems to practice implementation after the USACO Jan 2023 Silver P1 problem (which I horribly failed btw)! Rating should be roughly around 1600-1900, but as long as the implementation is good practice i don't really mind!

Полный текст и комментарии »

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

Автор karthiksing05, история, 22 месяца назад, По-английски

hey guys! so i was working on this problem Stick Division on CSES on the USACO Guide. Eventually I got the right answer, but one of my first submissions was this LINK, which I thought ran in O(N^2) time: was very surprised to see that it ran through without being timed out seeing as N was a maximum of 10^5 (ofc 2 out of the 6 test cases passed anyways so still problematic). To summarize: my question is, what's the time complexity of this and if it's higher than O(NlogN), why did it run this way?

Полный текст и комментарии »

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