muxecoid's blog

By muxecoid, 8 years ago, In English

After not participating in topcoder competitions for 4 years I'm rather rusty. Topcoder algorithm competitions seem to be in a bit of decline now (correct me if I'm wrong) so I decided to switch to codeforces. Here are my notes on differences from topcoder format and other observations.

  • Arrays are 1-based

Looks like whoever wrote the guidelines for codeforces is a huge fan of Pascal language. If you are used to C++ convention favored by topcoder you will lose time trying to understand why the answer in subject cases is like it is and also fixing your code when you realize you implemented 0-based output.

  • Standard input, standard output

In topcoder your IO is through STL/C#/Java containers. Here you must parse IO. This reminded me how rarely I used scanf and cin in my life before.

  • Problems with multiple solutions

In case there are many solutions print any of them. If your solution for sample case does not match sample solution you are not necessary wrong.

  • Score for all problems is from start of contest, not from opening specific problems

It may be a good idea to read all problems before attempting to solve the first and decide which to solve first.

  • I need a proper IDE

Running stuff in ideone.com is too slow. Must compile locally. I'll give CodeLite a try.

  • I need more snippets

A bigint library is a must for a C++ contestant like me. I was too lazy to find one while on topcoder, now is the time. Some IO utilities would be nice. Refactor everything I used during contest and feel I may need to use again as a snippet.

Edit — messed up the markup syntax

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

»
8 years ago, # |
  Vote: I like it +15 Vote: I do not like it

Some comments:

"Looks like whoever wrote the guidelines for codeforces is a huge fan of Pascal language."

Or any language except C and its successors. Algol, Basic, Cobol, Fortran, etc., use 1-based indexing.

Also in scientific literature 1-based indexing is usually used.

"A bigint library is a must for a C++ contestant like me."

Actually, there is no need to use bigints in Codeforces problems, long long is enough.

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I'll give CodeLite a try.

You may also like to try geany, sublime-text or vim, I like them :)