Save value across different executions of code for a problem

Is there any way to save a value across multiple executions of our code on different subtasks in a problem?

Can I run a specific function of my code for a specific subtask in the CODECHEF problem by keeping a counter variable?

Is there any way to save a value across multiple executions of our code on different subtasks in a problem?

No. This would require storing a value to a server which isn’t possible on Codechef.

Can I run a specific function of my code for a specific subtask in the CODECHEF problem by keeping a counter variable?

Yes, you can simply use if conditions to verify input constraints and then forward execution to that specific function.

1 Like