Is the program run once for each subtask(all t
test cases per subtask) or are the subtasks divided into ranges of test cases?
Depends on the problem.
Sometimes the first way, sometimes the other way.
And is this usually explicit in the problem statement?