20+ Penalties for One Missing (long long)

Revision en1, by TT-ALFI, 2026-06-07 18:53:44

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)

Tags #story, #contest, #competitive-programming, #iupc

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English TT-ALFI 2026-06-07 18:53:44 753 Initial revision (published)