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

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

Today, I had spent hours trying to solve problem : (https://codeforces.me/contest/1334/problem/C) and submitted several solutions with an O(n) complexity, but I kept getting a TLE. After some further inspection, I changed from using cin to scanf, and my solution was finally accepted. While it's well-known that scanf is slightly faster than cin, I was surprised by how much of a difference it actually made in this case.

TLE Code : 284211972 Accepted Code : 284212724

This blog may not be overly educational, but I just want to highlight that even a O(n) solution can lead to a TLE error. Understanding this can help you avoid the frustration and wasted time that I experienced.

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

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

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

I am kinda new to this platform but I have a question. I only have participated in a total of 5 rated contest with my rankings ranging from 5000 to 10000, but on my 2nd contest I got +500 with a ranking of 10.000 and by that I am now a Specialist with a max contest ranking 5000.

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

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