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

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

For testing how long it takes to execute a loop of 10^9 turns, I have come up with a wonder that the code gets AC within 15 ms!!!!! Though the loop part is not related to the solution. Then I did the same with one extra nested loop and still the time taken was 15 ms :D I chose problem 592B - The Monster and the Squirrel for the test and my code is : http://pastebin.com/LpskC8Ti

How is that possible???

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

»
11 лет назад, скрыть # |
 
Проголосовать: нравится +13 Проголосовать: не нравится

Compiler optimized your code to the single formula. You can read more about -O2 optimization.