JustPaste.it

All the good days.

All that is written below is not an April Fool's joke, but the event is fun, too:) We are pleased to announce a competition for a new experimental Codeforces - "contest parser: parsing problem file."

Have you ever made up workout, using archives of past contests? You are pumped from the Internet archives of contests to test their decisions locally? If yes, then you could not help noticing that every organizer and strive to invent their own format proliferation objectives. Yes it's true!

During my life I have prepared and carried out an enormous amount of training in past competitions. Often, it's pretty monotonous work - often to each task to write some scripts that will rename the input / output files of the problem in standard form. The archives are called quite differently: can it river.in.1, river.out.1, river.in.2, river.out.2 etc. In another problem, this can be tests/1.dat, tests/1.ans, tests/2.dat, tests/2.ans etc.

At one time it bothered me, and I wrote a script that based on some heuristics and patterns podmechennyh me guessing patterns of paths to files with the tests. The script has worked quite well, but imperfectly.

Codeforces working to improve the functionality of the project as a training ground. We plan to give users the ability to prepare and conduct training directly to Codeforces. You prepare yourself, or select a public training session to attend. Have prepared for yourself? Excellent! Give the public access to it and people will thank you.

We have already done a great job, and some of the functional developed. There is still much to do, technically challenging moments and simple routine. However, I am sure that the community is young and talented programmers can deal with some problems no worse than the team Codeforces. For example, it could be the problem of automatic recognition of the contents of the archive task.

So, in short, you are given a set of files pertaining to this problem. Your program is based on podmechennyh laws, heuristic decisions or otherwise shall provide test files (input and answers) solutions and source code checker.

The most important thing: the code of the winner will be issued in a separate small libraries, which will distribute the free license. This code will use Codeforces to automate routine processes. You really help us, your name will go down in history Codeforces, and the code you write code that will be used regularly for the benefit of the community. I'm still not convinced you take part?

Since almost the entire code base Codeforces written in Java, then the solutions to this problem, we expect that language. We believe that you do not need deep knowledge of Java - will probably be enough basic knowledge of the language.

We even decided to nominate a small prize fund, which will be split between the best of five members:

    * 1 st place - 8000 rubles.
    * 2 nd place - 4000 rubles.
    * 5.3 place - 2000 rubles.


Condition of the problem

Your task is to write a java-program that runs in the directory containing the files of one or more tasks.

Relative paths of all files pertaining to this problem are listed in the file files.lst, located in the root. Separator in the path directory is the symbol '/' (UNIX-separator).

Example (files.lst):

tester / check_a.pas
tester / check_a.exe
a/tests/02.in
a/tests/01.ans
a/tests/01.in
a/tests/02.ans
a / tests / gen.exe
a / tests / t.bat
a / tree_mm.exe
a / tree_mm.cpp
a / doall.bat
a / problem.xml
a / validator.cpp
a / tree_dm_wrong.cpp

The program has the right to read and analyze only those files that are listed in files.lst.

The program's objective - to draw a set of tests for this problem (an official, if there are several), the source solutions (if found) and the source code checker program (if found).

The output should be output to stdout. The output should contain one to three sections: a section of tests, making the section and the section checker (is mandatory only sections of the test).

Sections of the test must start with a line "tests:". Further, it must contain one or more of the string consisting of the file name of the test file name and the answer to this test, separated by ':' (colon). Tests should be listed in ascending order of their numbers in the original problem. This conclusion follows only official tests (in case it was found several sets of tests).

Example (section tests):

tests:
a/tests/01.in: a/tests/01.ans
a/tests/02.in: a/tests/02.ans

Section decisions if it is present in the output must follow the second order. Section begins with the line "solutions:". This is followed by lines containing the names of the source files making. The order of file names - lexicographic. Under the decisions are understood as the correct and incorrect decisions (which are often also present in the archive of the jury).

Example (section decisions):

solutions:
a / tree_mm.cpp
a / tree_dm_wrong.cpp

Section checker if it is present in the output should start with a line "checker:" and contain a single element - the name of the source file checker.

Example (Section checker):

checker:
tester / check_a.pas

Thus, the total output might look like:

tests:
a/tests/01.in: a/tests/01.ans
a/tests/02.in: a/tests/02.ans
solutions:
a / tree_mm.cpp
a / tree_dm_wrong.cpp
checker:
tester / check_a.pas

All file names in output must be exactly in the form as they appear in the file files.lst.

Your decision will be run with a constraint on memory usage "-Xmx32M-Xss1M" (heap size 32M, stack size 1M). Limitation on time - 1 second.

The main class of your program should have a name ProblemParser and be in the default package.

How it all will pass

The competition will last two weeks and will end at noon on April 15. The system of the competition until we finally did not finish and will be improved and expanded in the coming days.

You are waiting for the familiar tabs: send my parcel, the status and situation of the parties. You can send a single file (ProblemParser.java) or zip-avhiv the source of your project.

Testing in these two weeks will be made on 30 benchmarks. The first ten of them open - you can download them. The archive is available answers to these tests, they are located in the files answer.lst. Twenty of the remaining tests, you do not know. Participants we sort by increasing order of scores being equal - to decrease. time to reach points. Solutions can send any number of times, if it all, then set the limit on the frequency of shipments. Score accounted for the recent decision of the problem.

The decision may gain one point for each test. Partial error on the test results in its failure to perform.

After finishing the main part of the competition, we will be a more testing. For each participant will be tested by his last attempt at an expanded set of tests. This set will contain 20 of the familiar indoor tests and 20 new ones. Since the problem and the system of the well, very experimental, we reserve the right to change something in the course of the contest, though I hope that substantial changes are needed.

All tests are the real problem (perhaps slightly modified). Tasks are from a variety of sources - we have tried to cover most of their geographical origin.

If this experiment proves successful, we will try to expand the experiment. In my head there are a few interesting problems whose solutions will prove useful to community

Let's play,
MikeMirzayanov