Skip to content

Adding a GCJ style output

Alexey Dmitriev edited this page Nov 11, 2018 · 1 revision

GCJ require to output number of each test, you can save it in a member variable of solver class and increase on each call to a solve() function.

class %ClassName% {
public:
	int testNumber = 0;
	void solve(std::istream& in, std::ostream& out) {
		out << "Case #" << ++testNumber << ": ";
	}
};

You may also leave this output commented out in the template so that it doesn't print anything by default