vinhhocptit's blog

By vinhhocptit, history, 3 months ago, In English

Today, I had spent hours trying to solve problem : (https://mirror.codeforces.com/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.

Full text and comments »

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

By vinhhocptit, history, 8 months ago, In English

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.

Full text and comments »

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