I'm trying to create a Hello World type problem on polygon that requires only printing a statement as solution. So the problem will not have any input. Similar to the problem 1812A
I'm not finding any guide on setting such a problem. Like what will the test be.
Please help me with it.
Go to the Tests section in Polygon and add a test case where the expected output is what participants need to produce to receive an "Accepted" verdict.
If you want multiple specific outputs to be accepted, for example both agent_p and helloworld123, you will need to create a custom checker in the Checker section of Polygon.
Example code below:
How can I keep the input of the test blank?
I've prepared output-only problems multiple times.
In the input section I usually write single sentence "No input" or "Reading data is not required" and then set up tests like that
Multiple tests in case a solution is not deterministic.
Putting "NO INPUT" and disincentivising participants from reading it might be even better than a blank input. If you really want to make a test with empty input you can uncheck "Tests well-formed" and then "Add Test" > "from the files" and upload empty file.
If you want to include a sample into problem statement to show output format, but at the same time you want to hide the real answer to the problem you can
"Edit" a test
check "Use in statements"
"If you want to specify custom content of input or output data for statements click here"
provide statement-only output
uncheck "Verify output for statements"
Also you can implement custom checker that will directly compare solution output to the right hardcoded answer.