||What's wrong with my code? Greed 2.0 can run the test cases with success and I was also able to test with success in the interactive shell. If I do bach testing I always get the error:
TypeError: 'int' object has no attribute '__getitem__'
and if I run the system tests it won't even run the first one, it exits with abnormal termination.
I use Python3. Does TopCoder not support python fully?
def countWays(self, h):
my_set = set()
for i in range(len(h)):
t = h[:i] + h[i+1:]
my_set.add(tuple(i for i, h in sorted([(i, h) for i, h in enumerate(t)], key=lambda x: x, reverse=True)))