Warning: session_start(): open(/var/lib/php/sessions/sess_gndaqjg0i1pf5o48tes74mkmd2, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
-- expects two snippet IDs (solution, test case) as input
-- example: "#121 #122"
if input == nil then error("Needs input.") end
solutionID, testCaseID = input:match("([^ ]+) +([^ ]+)")
if not solutionID then
error("Could not parse input, expected two snippet IDs")
end
solutionF = loadSnippet(solutionID)
assert(solutionF, 'Solution does not parse: '..solutionID)
pcall(solutionF)
if solution == nil then solution = function(_input)
input = _input -- yeah the whole env thing is hacky right here
return solutionF()
end end
verifierF = loadSnippet(testCaseID)
assert(verifierF, 'Test case does not parse: '..testCaseID)
if verifierF() then
print "Verified!"
solution = nil -- to not apply RunCmd/DebugCmd's "find solution function" magic...
return true
else
error("Not verified.")
end