TheCodingMathematician's blog

By TheCodingMathematician, history, 7 months ago, In English

Hi Codeforces! I just started CP from a math competition background in September (?) but only started CF recently and I have been using Java. Would it be a good idea to learn C++? Java has been mostly fine for me at the lower levels, but now that I'm starting to get more experience it might be a good idea to switch over.

Also, do you put your solutions all in one file or a separate file for each solution? I'm currently having them all in separate files but I have to copy over extra functions every time. I'm starting to think one file would be better, but I wanted to hear what other (and probably more experienced) participants think.

»
7 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Most people use C++, nonetheless Java can be used in all PC contests I'm aware of. It's more of a preference and I know very little Java so I'd say it's easier to code in C++, but it shouldn't actually make a difference though I suggest C++. For the second part, make a template where you have already the functions you will probably need so you save time, for the solutions copy the template to a different file or editor and code over it. You don't need to make and save a file for every problem you try to solve, but again it's just a preference.

»
7 months ago, # |
  Vote: I like it 0 Vote: I do not like it

id say learn c++, mostly stuff (resources / templates / intended solns etc) are on c++.