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 136 点赞 2 评论 206 浏览
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 140 点赞 2 评论 212 浏览