# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
124924 |
2019-07-04T07:16:46 Z |
Touubs |
CATS (NOI14_cats) |
Python 3 |
|
1500 ms |
228616 KB |
def main():
(X, L, N) = map(int, input().split())
flips = 0
S2 = [0 for _ in range(X)]
S1 = [0 for _ in range(X)]
COUNTER = X
print(12)
return
while COUNTER > 0:
#print("S1: ", S1)
#print("S2: ", S2)
#print("COUNTER: ", COUNTER)
#print()
S2.append(S1.pop()) #Push the top element of S1 onto S2
#Pop the top element of S1
S1 = [v ^ 1 for v in S1]
flips = flips + 1
if S2[-1] > L:
#print("conter.dec", flips)
COUNTER = COUNTER - 1
if COUNTER == 0:
print(S2[-1])
#print("total flips: ", flips)
return
else:
S2.append(N)
S2.append(N)
S2.append(S2.pop() + S2.pop())
S2.append(S2.pop() + S2.pop())
S1.append(S2[-1])
S1.append(S2.pop())
S2.pop()
q = int(input())
for i in range(q):
main()
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
104 ms |
13840 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1572 ms |
25640 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1575 ms |
22312 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1558 ms |
20804 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1587 ms |
225656 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1590 ms |
228616 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |