Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

题解及next_permutation函数用法汇总

Posted by 12408100135 at 2013-11-13 19:44:43 on Problem 1833 and last updated at 2013-11-20 14:03:08
题意:有一个已知的排列,求这个排列之后的第k个排列。
如果遇到最后一个排列,则下1排列为第1个排列,即排列1 2 3…n。
需要注意的两点:
1,如果用next_permutation()提交,C++过,而G++TLE;
2,即使使用C++提交,scanf(),printf()过,cin,cout TLE。

http://blog.csdn.net/u011328276/article/details/15893233

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator