What I know:
Every language has a set defined time limit accordingly. If that time limit is exceeded, the code is killed and status is set as TLE.
What I want to know:
Let’s say we have a question. The answer is supposed to be of N lines.
Is a code killed as soon as it outputs the wrong answer(line)? Or is it allowed to keep running?
If, it is allowed to run even when it initially printed the wrong answer and exceeds the time limit, what would be the solution catogrized as? TLE or WA?
Could probably test this using a quick experiment: pick a random Problem, and try submitting:
using namespace std;
cout << "THIS CAN'T POSSIBLY BE THE ANSWER TO ANY QUESTION, SURELY" << endl;
I tested it: https://www.codechef.com/viewsolution/30197924
Judge runs the code:
If the code exceeds the time limit:
Set status as TLE
Else if the program successfully finishes before the time limit:
If the answer was correct:
Set status as AC
Set status as WA
/** Other Cases as Memory Segmentations, Out of bounds, etc **/