第一题 AC 思路:维护N个stack,统计每个人拿在手里和包里的商品价值 N, M = list(map(int, input().strip().split(' '))) prices = list(map(int, input().strip().split(' '))) # 单价 stack = [[prices[i]] * 10000 for i in range(N)] ans = [0] * M for _ in range(M): operation = int(input().strip()) temp_prices = {'left': 0, ...