arameters for the user, the user’s password, the id of the problem, the programming language (as a varchar), and the source code. An output parameter returns the result of the submission, which is one of the strings that can return or “Bad Parameters”, which handles cases such as incorrect password for the user, or the attempt to submit using a language that the program does not support (e.g., Malbolge or Visual Basic). The stored procedure can simulate the program judging process: if there is no Bad Parameters error, then randomly choose between Accepted, Wrong Answer, Time Limit Exceeded, and Run Time Error with equal probability. The submission should gets recorded in the database.
Create a MySQL stored procedure to validate an attempt to create a new submission. The stored procedure should have parameters for the user, the user’s password, the id of the problem, the programming language (as a varchar), and the source code. An output parameter returns the result of the submission, which is one of the strings that can return or “Bad Parameters”, which handles cases such as incorrect password for the user, or the attempt to submit using a language that the program does not support (e.g., Malbolge or Visual Basic). The stored procedure can simulate the program judging process: if there is no Bad Parameters error, then randomly choose between Accepted, Wrong Answer, Time Limit Exceeded, and Run Time Error with equal probability. The submission should gets recorded in the
Step by step
Solved in 2 steps