Weak test cases for FCUBE

The test cases for the problem are weak. For the worst case accepted solution are showing TLE on ideone.

Solution 1 Accepted link

Solution 2 Accepted Link

I checked only for 2 submissions. Please help if the test case is wrong.