MahmytM's blog

By MahmytM, history, 3 months ago, In English

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!

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

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

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.