Byang’s friend is building a sport programming platform and needs your help with one of the modules…
Click here to read the complete problem statement.
If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.
i=0
OP=[]
N, CPU, MEM = map(int, input().split())
while i!=N:
Di, CPUi, MEMi = map(int, input().split())
if Di!=0:
OP+=["WA"]
if MEMi>MEM:
OP+=["MLE"]
if CPUi>CPU:
OP+=["CLE"]
i+=1
if "CLE" in OP:
print("CLE")
elif "MLE" in OP:
print("MLE")
elif "WA" in OP:
print("WA")
else:
print("AC")
I used this code. It gets wrong answer in the 4th case. Can someone give me a hint what my fault could be here?
When you need to generate the output of a test case, you can always use uDebug (assuming that it has an entry for the problem you are trying to solve):
You then know what the input is for test case 2 and what the expected output should be. Why not check your code to see why it is failing for that case then?