TT-ALFI's blog

By TT-ALFI, history, 5 months ago, In English

During my first semester, I participated in my university's IUPC selection contest.

There was one problem that looked easy. I came up with the solution quickly and submitted.

WA. "No problem," I thought. Submitted again. WA. Again. WA.

At some point, I wasn't solving the problem anymore. I was farming penalties.

After 20+ submissions, I finally found the culprit:

(int)

The problem needed: (long long) That's it. My algorithm was fine. My observations were fine. My confidence was definitely not fine.

That day I learned an important lesson: In competitive programming, the hardest bug isn't always in the logic. Sometimes it's hiding inside four innocent-looking letters:

(int)

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