My solution for the problem "Paycheck" was judged as incorrect (wrong answer) during the competition. However, I found out that it was due to the setprecision C++ function (which I used). It turns out that it rounds to the closest value, instead of truncating it, and the problem statement doesn't say results should be truncated instead of rounded. In fact, rounding the result is more precise than truncating. Example input:
3
1 1 1 2 1 2
The output by truncating is: 1.66
The output by rounding is: 1.67
But only the output calculated by truncating is judged as correct! So, everyone who was calculating the output by rounding got 0 points on that problem. Are you sure that it is OK to score problems this way?
3
1 1 1 2 1 2
The output by truncating is: 1.66
The output by rounding is: 1.67
But only the output calculated by truncating is judged as correct! So, everyone who was calculating the output by rounding got 0 points on that problem. Are you sure that it is OK to score problems this way?