Time Limit Check
Time limit2sMemory limit256 MB
For each case, evaluate f(N) times T from the named complexity and print TLE when it exceeds 10^8 times L.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Yubin got a time limit exceeded verdict on the judge, and decided to work out the time complexity by hand.
The judge performs operations per second. With a time limit of seconds it allows operations in total.
Suppose a program has time complexity , the input size is at most , and there are test cases. The program then performs operations. If that number is greater than the allowed number of operations, the program exceeds the time limit. Otherwise it may pass.
Report the verdict for each situation.
Input
The first line contains the number of situations . ()
Each of the next lines contains a string describing the time complexity, the maximum input size , the number of test cases , and the time limit in seconds, separated by spaces. (, , , and , , are integers)
is one of the following five strings, written without spaces.
O(N):O(N^2):O(N^3):O(2^N):O(N!):
Output
Print one line per situation. Print TLE! if the program exceeds the time limit, and May Pass. otherwise.