Open nagato1208 opened 5 years ago
https://nagato1208.github.io/2019/08/30/codeforces-1208D-Restore-Permutation/#more
描述对于[1, n]闭区间的所有整数的某个permutation permutation, 我们有数组nums. 定义nums的每个元素nums[i]表示在permutation的下标i之前的比permutation[i]小的所有数的和.例如如果nums是0 0 0, 那么permutation是[3,2,1]. 因为对于每个数, 没有在它之前的比它小的数. 如果nums是0 1 1 1 10,
需要更多的线段树练习
PyPy is much more effective than Python. This solution gets a TLE with Python while gets accepted with PyPy.
PyPy
Python
https://nagato1208.github.io/2019/08/30/codeforces-1208D-Restore-Permutation/#more
描述对于[1, n]闭区间的所有整数的某个permutation permutation, 我们有数组nums. 定义nums的每个元素nums[i]表示在permutation的下标i之前的比permutation[i]小的所有数的和.例如如果nums是0 0 0, 那么permutation是[3,2,1]. 因为对于每个数, 没有在它之前的比它小的数. 如果nums是0 1 1 1 10,