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

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

For my first solution I was expecting WA because of integer overflow (int sum) but I got TLE instead which is odd because my time complexity is O(n) and it should work for the maximum value of n(10^6)!! Then I just tried the same code with scanf/printf and got AC :| I also changed the type of sum to long long and used cin/cout like the first time and got AC! Can someone tell me WHYYYY?

link to my second solution

link to my third solution

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

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