Bayan Programming Contest

Bayan Programming Contest

How to Solve and Submit a Solution

Friday, 10 October 2014، 02:54 AM

Submitting a Solution

Bayan Programming Contest follows an output-only style. When you have written and tested your code, you can request an input by clicking on the "Submit" area of the problem description page. A file with ".in" extension will be downloaded to your computer. You should then produce the corresponding output and save it to another file (It's a good practice to have this filed named "problem_name.out").

When you have an output file, you can submit it in the contest platform. The contest judge will analyze your submitted output and mark it as accepted or rejected.

Note that you have just a few minutes to run you program and submit an output after you have downloaded an input file. If you fail to submit an output in time, a rejected submit will be counted for you.

Also be careful that each time you request an input, a different one will be given to you. So if your submission has been rejected, you should request a new input file.

Working with input/output files

Usually, a program you have written, reads it's input from standard input and writes it's output to standard output. Traditionally, standard input means keyboard and standard output means your console output on the display. But one can redirect standard input, so that the program reads it's input from a file instead of the keyboard. Standard output can also be redirected, so that program's standard output will be written to another file. In both Linux, Mac OS and Windows Console, you can redirect input and output using pipes and redirectors.

For example, if you have compiled your code to "p1.exe" in windows, by running the following command:
p1.exe < > problem1.out
"p1.exe" will be run, but it will read it's input from file "" and write it's output to "problem1.out". If you have downloaded a problem input file "", submitting your solution will be as easy as compiling your code, running such a commands and uploading the output file along with you code on the contest problem page!
  • 14/10/10