-
Notifications
You must be signed in to change notification settings - Fork 31
Usage
To create task click "Plus" icon (or use shortcut) and fill all the fields.
All the fields are pretty obvious except Multitest type:
-
Single test: Just a single test.
solve()
method is called once. -
Number of test known: An integer is read from the start of the input and then
solve
called number of times equal to that integer. -
Number of test unknown:
solve()
method is called while it's possible to read from the input stream(EOF is not reached, there were no reading errors,in.good()
is checked). Note, if there's nothing to read, but you didn't reach the end of stream trying to read, solve will continue to be called. You should manually set eof state (in.setstate(std::ios_base::eofbit)
) or read after the end. Examples:-
Reading up to the end:
void solve(istream& in, ostream& out) { int n; if(!(in >> n)) { return; } //solve for n }
-
Reading until 0 is reached
void solve(istream& in, ostream& out) { int n; in >> n; if(n == 0) { in.setstate(std::ios_base::eofbit); //set stream flag manually // OR in >> n; // eof flag will be set now since there's nothing to read return; } //solve for n }
-
After that run configuration will be created and you'll be able to run it choosing it in the select-box on the toolbar. After you run it output and test files will be generated and "testrunner" configuration will be run.
To submit file use your output file or "Copy output file" action.