nagato1208 / nagato1208.github.io

For my blog
2 stars 0 forks source link

codeforces-1208D Restore Permutation | Nagato's blog #16

Open nagato1208 opened 5 years ago

nagato1208 commented 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,

nagato1208 commented 5 years ago

需要更多的线段树练习

nagato1208 commented 5 years ago

PyPy is much more effective than Python. This solution gets a TLE with Python while gets accepted with PyPy.