难度指数:⭐⭐
知识点: 逻辑分析
Mine:
代码实现
from time import time
def solve():
return 0
def solve0():
play = []
wait = []
unhappy = 0
for i in range(len(nums)):
p = nums[i]
if p in play:
play.remove(p)
elif len(play) < car:
play.append(p)
elif p not in wait:
wait.append(p)
else:
unhappy += 1
return unhappy
T = 1
while T:
car = int(input())
nums = input().split(' ')
t1 = time()
res = solve()
t2 = time()
res0 = solve0()
t3 = time()
print(res, res0)
print(t3 - t2, t2 - t1)
T -= 1