Skip to content

Instantly share code, notes, and snippets.

@henix
Forked from fcicq/fcicq-question.txt
Created February 27, 2018 10:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henix/e62a323040349e58aadb20648532d860 to your computer and use it in GitHub Desktop.
Save henix/e62a323040349e58aadb20648532d860 to your computer and use it in GitHub Desktop.
A simple question
有一存有整数的数组 A[n] (n <= 2^31 - 1, 但需要的话可以再扩大), 其中 0 <= i, A[i] <= n-1 且 i!=j 时 A[i]!=A[j] (即一个排列). 用你认为*最高效*的方法求 B=A^(-1) (即对范围内满足 A[B[i]]=i 的 B)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment