Skip to content

Instantly share code, notes, and snippets.

@fcicq
Created September 7, 2012 13:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fcicq/3666272 to your computer and use it in GitHub Desktop.
Save fcicq/3666272 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