摘要:
问题1 给出一个$1 \sim n$的全排列$P$, 求它是所有全排列的第几个 (0 based)? 做法 从左到右看$P$的每一位, 考虑当前可以确认有多少全排列在$P$之前. $ $: 所有第一位是$1 \sim P_1 1$的排列都在$P$之前, 共有 $(P_1 1)(n 1)!$个. $P 阅读全文
「以解决问题为乐」
真的喜欢么?真的喜欢就去做吧。
Lost Boy Calling 。。。。
... Many of these issues are best dealt with at the algorithmic level, rather than by "tweaking" the code.
This is an obscurity that catches the unwary.
原来我什么都不懂。