Fseq【问题描述】一个长度为 N+M 的数列,里面有 N 个+1,M 个-1如果一个这样的数列被称作 F 序列(Fadeness) , 当且仅当它的任意前缀和均非负。for example :1,-1,1,1,-1 is a Fadeness1,-1,-1,1,1 is not because S ...
分类:
其他 时间:
2017-08-07 00:00:46
收藏:
0 评论:
0 赞:
0 阅读:
554
代码; class Solution { public: /** * @param A an integer array * @return a long integer */ long long permutationIndex(vector<int>& A) { // Write your co ...
分类:
其他 时间:
2017-08-07 00:00:08
收藏:
0 评论:
0 赞:
0 阅读:
220