Python--遍历列表时删除元素避免漏删 // An highlighted blocka = [1,2,3,4,5,6,7,8]i = 0while i < len(a): if a[i] > 5: i = i + 1 else: del a[i] print(a) python 2023-08-28 59 点赞 0 评论 89 浏览
Codeforces 691D Swaps in Permutation【并查集+优先队列+贪心】 D. Swaps in Permutationtime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a permutation of the numbers 1, 思维 2023-08-21 66 点赞 1 评论 100 浏览