eolymp
bolt
Try our new interface for solving problems
Problems

Time Limit Exceeded

Time Limit Exceeded

\includegraphics{https://static.e-olymp.com/content/ad/add0458e1ed9109f0825a776121ea5931fbf5144.jpg} As you should be aware by now, one of the verdicts you can get when submitting a solution to a problem is \textbf{Time Limit Exceeded} (\textbf{TLE}). This means that the running time of your solution exceeds the time limit set by judges. Let us assume that the judging server can make \textbf{100000000} operations per second. Given the time complexity of your solution expressed using \textbf{big-O }notation, maximum size of the input per test case \textbf{n}, the number of test cases \textbf{t }and the time limit for all cases \textbf{l }can your solution run in time? Assume that your solution uses only simple operations and disregard any other overhead (e.g. I/O). \InputFile Input starts with a line containing the number of test cases \textbf{c}(\textbf{1 }≤ \textbf{c }≤ \textbf{100}). \textbf{c} lines follow, each of the format \textit{\textbf{time_complexity}}\textbf{ n t l} where \textbf{n}, \textbf{t }and \textbf{l }(\textbf{1 }≤ \textbf{n }≤ \textbf{1000000}, \textbf{1} ≤ \textbf{t}, \textbf{l} ≤ \textbf{10}) are integers as described in the problem statement. and \textit{\textbf{ time_complexity}} is one of the following: \textbf{O(N), O(N^2), O(N^3), O(2^N), O(N!)} Note: We use a very simplified complexity model here and familiarity with \textbf{big-O }notation is not required (or may even be detrimental). Just assume that applying \textbf{n} to the function in the parenthesis is what gives you the total number of operations your solution will use. \OutputFile For each test case print on one line either "\textbf{TLE!}" if the running time of the solution exceeds the time limit for that test case or "\textbf{May Pass.}" if it does not.
Time limit 1 second
Memory limit 64 MiB
Input example #1
5
O(N) 1000 10 10
O(2^N) 1000 10 10
O(N!) 2 10 10
O(N^3) 1000 1 10
O(N^3) 1001 1 10
Output example #1
May Pass.
TLE!
May Pass.
May Pass.
TLE!
Author Hichem Zakaria Aichour
Source 2013 Calgary Collegiate Programming Contest, Problem A