Warning
This page is located in archive. Go to the latest version of this course pages. Go the latest version of this page.

Brute

Solutions to homework and contest semester project are submitted to Brute where they are automatically checked and evaluated (the research semester project is also submitted to Brute, however it is evaluated manually by the corresponding lab teacher). General information about the Brute

  • Supported programming lanugages: C++, Java, Python. The Brute tries to automatically detect the language of submitted source codes by checking the file suffixes (cpp for C++, java for Java, py for Python).
  • Compiled programs must be able to run on GNU/Linux operating system.
  • All programs are linked with Gurobi 8.1 solver and with the exceptions specified below, the source codes are expected to be independent on other than standard libraries.
  • Source codes with multiple files has to be submitted as .zip archives.
  • If your program exits with non-zero status, you will be notified about this. Usually, non-zero status is returned when your program crashes.

Details about input, output and command line arguments of your compiled programs are provided in the corresponding assignment PDFs.

Important: the time limits are scaled by the programming language in the homework assignments. However, this is not true for the contest semester project, i.e. all programming languages have the same time-limit in the contest semester project.

From now on, assume that $ROOT_DIR is the root directory with your submitted source codes.

C++ details

Requirements:

  1. all source files must reside in $ROOT_DIR (subdirectories are not allowed)
  2. all source files have either cpp or h suffix
  3. one of cpp files must contain main() function

Source codes are compiled with g++ compiler, version 6.3, with flags -std=c++11 -O2 -march=native -pthread .

Java details

Requirements:

  1. all source files must reside in $ROOT_DIR/combopt directory (subdirectories are allowed)
  2. all source files have java suffix
  3. the top package of all source files is combopt
  4. source file $ROOT_DIR/combopt/Main.java must exist and must contain the Main class with main() method

Source codes are compiled with Oracle Java compiler, version 1.8.

Python details

Requirements:

  1. source file $ROOT_DIR/main.py is the top file that will be run and therefore it must exist
  2. source file $ROOT_DIR/main.py begins with shebang #!/usr/bin/env python2 (for Python2) or #!/usr/bin/env python3 (for Python3).
  3. all Python files must be encoded in UTF-8.
  4. if you want to use Gurobi library, import gurobipy module.

Source codes are run with cpython interpreter, version 2.7 or 3.6 (depends on shebang in $ROOT_DIR/main.py, see above). Additional allowed libraries:

  • numpy

Common issues

  • Incorrectly taking the command line arguments. In C++ and Python, argv array contains the name of your program on the 0-th index, whereas in Java this name is not included.
  • Not sanitizing your output file. Make sure that the content in the output file matches exactly the format specified in the assignment handouts, i.e., no extra spaces, no extra blank lines etc.
  • Using text encoding format other than UTF-8 in the source codes. We recommend using UTF-8 for maximum compatibility.
  • When receiving time limit as a command line argument (e.g., in semester project), not keeping a reserve time for outputting the solution into the output file. Keep in mind that the time limit you receive is the same time limit as in UploadSystem after which your program is killed. Therefore, it is possible that your program is killed before it outputs the solution into the output file. Different languages and different solution sizes might require different reserve time, so you should experiment to find the right amount.
courses/ko/upload_system.txt · Last modified: 2021/01/20 12:08 (external edit)