Блог пользователя MahmytM

Автор MahmytM, история, 2 месяца назад, По-английски

I started solving IOI,APIO,EJOI..... problems. And in 60%-70% of problems there is implementation details.For example. In that problem

This

And there is place:

And this

What to do in such problems help please!

  • Проголосовать: нравится
  • +2
  • Проголосовать: не нравится

»
2 месяца назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

You should see a file called grader.zip below "Attachments" towards the right side of your screen. If you download and unzip that file, it will contain all the files you need. You simply have to navigate to cpp/molecules.cpp and code your solution in that file (inside the function that has been declared for you, e.g. find_subset in this case).

To test your code locally, you simply have to run compile_cpp.sh (you can do this by running sh compile_cpp.sh in the terminal) and enter the input according to the format described by the problem statement. (so you first input n, then l, then u, then the array w of n integers). You should never explicitly read input in your own solution, the input is given to you as a set of function parameters.

Though personally, the provided compile_cpp.sh file never works properly for me, and I'm too lazy to figure out the reason, so I just delete the flag -static from the file and it somehow works.