求一个数是第几个排列数
根据康托展开公式:
a[i]为第i个数比后面的都小的个数。
#include <stdio.h> #include <string.h> int FAC[10] = {1,1,2,6,24,120,720,5040,40320,362880}; int CantorExp(char *s, int n) { int i, j, t, num = 0; for(i = 0; i < n; ++i) { t = 0; for(j = i+1; j < n; ++j) if(s[j] < s[i]) ++t; num += FAC[n-i-1]*t; } return num+1; } int main(int argc, char *argv[]) { char s[] = "1324"; //输入一个排列数的字符串序列 printf("%d", CantorExp(s, strlen(s))); return 0; }
2020年5月20日 19:45
Below you will understand what is important, the idea provides one of the links with an exciting site: Benefits of Darjeeling Tea
2020年5月20日 19:55
It's superior, however , check out material at the street address. Benefits of Matcha Tea
2020年5月20日 20:02
Such sites are important because they provide a large dose of useful information ... Benefits of Coffee
2020年5月20日 20:08
I've proper selected to build a blog, which I hold been deficient to do for a during. Acknowledges for this inform, it's really serviceable! Benefits of Oolong Tea
2020年5月20日 20:13
Hmm… I interpret blogs on a analogous issue, however i never visited your blog. I added it to populars also i’ll be your faithful primer. Benefits of Persimmons
2020年5月20日 20:18
Below you will understand what is important, the idea provides one of the links with an exciting site: Benefits Of Earl Grey Tea
2020年5月20日 20:37
It's superior, however , check out material at the street address. Benefits of Cucumber
2020年6月14日 02:40
For many people this is the best solution here see how to do it.
2020年6月14日 13:26
I understand this column. I realize You put a many of struggle to found this story. I admire your process. хотели гърция
2020年6月14日 13:33
Excellent read, Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. работни обувки
2020年6月14日 13:39
I can recommend primarily decent and even responsible tips, as a result view it: мебели софия
2020年6月14日 13:44
For true fans of this thread I will address is a free online!принтери варна
2020年6月14日 13:54
I use only high quality materials - you can see them at: тениски
2020年6月16日 04:36
This is important, though it's necessary to help you head over to it weblink: Singapore digital marketing agency
2020年6月16日 04:42
I personally use them exclusively high-quality elements : you will notice these folks during: training room rental in singapore
2020年6月16日 15:28
Hi there, I discovered your blog per Google bit searching for such kinda educational advise moreover your inform beholds very remarkable for me. FChat
2020年6月17日 01:56
Excellent read, Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work. 여유증수술
2020年6月18日 01:00
I can recommend primarily decent and even responsible tips, as a result view it: 스포츠중계
2020年6月19日 00:30
At this point you'll find out what is important, it all gives a url to the appealing page: ingilizce seslendirme
2020年6月19日 00:37
Very interesting information, worth recommending. However, I recommend this: garden seeds
2020年6月20日 00:18
The best article I came across a number of years, write something about it on this page. 토토사이트
2020年6月20日 02:40
I can recommend primarily decent and even responsible tips, as a result view it: 바둑이사이트
2020年6月26日 02:25
I came onto your blog while focusing just slightly submits. Nice strategy for next, I will be bookmarking at once seize your complete rises... casino guru at
2020年6月26日 21:02
You should mainly superior together with well-performing material, which means that see it: come vedere chi ti ha bloccato su instagram
2020年6月28日 19:30
So lot to occur over your amazing blog. Your blog procures me a fantastic transaction of enjoyable.. Salubrious lot beside the scene. A4 Display Stand
2020年7月02日 18:44
Welcome to the party of my life here you will learn everything about me. best halal catering Singapore
2020年7月02日 18:51
I invite you to the page where see how much we have in common. www.dynamicmarketing.sg/seo-expert-singapore
2020年7月04日 20:22
특히 일본의 호스트 구인구직 사이트를 둘러보다보면 드물게 기숙사 1인1실 제공! 이라는 문구가 적혀있다. 하지만 그건 99.9% 거짓말. 속지마라.[주의] 물론 매출이 매달 일정금액을 넘는다 라고 하는 호스트에게는 가게에서 먼저 제공해줄 수도 있겠지만, 대부분의 호스트 기숙사 같은 경우 4명정도가 2층 침대를 두고 사는 경우가 많다. 아무튼 이러한 경우가 다수다보니 개인생활이 없고 스트레스가 크다는 점이 있지만 무조건 돈을 벌어 독립을 하겠다는 동기부여가 되는 일도 많다고. 또한 자연스럽게 출퇴근도 용이해지며 팀플레이가 매우 중요한 일인 만큼 분명 나쁜 점만 존재하는 것은 아니라고 할 수 있다. 일을 시작한지 얼마 안된 호스트들의 경우 지명고객이 여럿 생기기 전팔리기 전까지는 정말정말 가난하기 때문에(...) 돈을 모으려고 생각한다면 숙소 생활을 하는 편이 좋다. 어차피 돈벌려고 이 짓 하는거잖아? 호빠
2020年7月07日 03:35
Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your rss feed to stay informed of any updates.Business Security system Installation
2020年7月07日 04:11
Welcome to the party of my life here you will learn everything about me. JP Builders
2020年7月09日 14:56
해외사이트 해외토토 추천 토토사이트 안전놀이터 업계최고 퀸88벳 안전놀이터
2020年7月19日 21:01
Very good topic, similar texts are I do not know if they are as good as your work out. Buy Youtube Subscribers
2020年7月24日 20:10
Awesome dispatch! I am indeed getting apt to over this info, is truly neighborly my buddy. Likewise fantastic blog here among many of the costly info you acquire. Reserve up the beneficial process you are doing here. CON Organic
2020年7月28日 03:26
For true fans of this thread I will address is a free online!wayfair trafic humain
2020年7月30日 20:31
I am always searching online for storys that can accommodate me. There is obviously a multiple to understand about this. I feel you made few salubrious points in Attributes moreover. Detain busy, awesome career! free mature cams
2020年8月03日 02:33
Can nicely write on similar topics! Welcome to here you'll find out how it should look. welcome offer
2020年8月09日 22:21
On this page, you'll see my profile, please read this information. tv commercial voice
2020年8月09日 22:29
Below you will understand what is important, the idea provides one of the links with an exciting site: signs
2020年8月09日 22:34
Cool you write, the information is very good and interesting, I'll give you a link to my site. signs
2020年8月09日 22:39
Your blogs further more each else volume is so entertaining further serviceable It appoints me befall retreat encore. I will instantly grab your rss feed to stay informed of any updates.leads online marketing
2020年8月09日 22:44
Welcome to the party of my life here you will learn everything about me. advertising pen
2020年9月19日 04:47
For many people this is the best solution here see how to do it.
2020年9月21日 17:31
I read this article. I think You put a great deal of exertion to make this article. I like your work.
2020年9月23日 03:32
For many people this is the best solution here see how to do it.
2020年10月04日 16:45
I use only high quality materials - you can see them at:
2020年10月07日 17:19
I understand this column. I realize You put a many of struggle to found this story. I admire your process.
2020年10月07日 17:56
Thanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing...
2020年10月07日 18:26
This is helpful, nonetheless it can be crucial so that you can check out the following website:
2020年10月07日 19:47
Your texts on this subject are correct, see how I wrote this site is really very good.
2020年10月13日 22:00
I understand this column. I realize You put a many of struggle to found this story. I admire your process.
2020年10月24日 03:06
The most interesting text on this interesting topic that can be found on the net.
2020年10月30日 03:31
I read this article. I think You put a great deal of exertion to make this article. I like your work.
2020年10月31日 22:53
You possess lifted an essential offspring..Blesss for using..I would want to study better latest transactions from this blog..preserve posting..
2020年11月01日 23:49
For many people this is the best solution here see how to do it.
2020年11月05日 21:35
Gives you the best website address I know there alone you'll find how easy it is.
2020年11月06日 01:14
This is exciting, nevertheless it is vital for you to visit this specific url:
2020年11月08日 01:01
Acknowledges for penmanship such a worthy column, I stumbled beside your blog besides predict a handful advise. I want your tone of manuscript...
2020年11月10日 22:58
These websites are really needed, you can learn a lot.
2020年11月11日 12:31
Below you will understand what is important, the idea provides one of the links with an exciting site:
2020年11月15日 16:21
Here we have provided all educational board class 10th & 12th Standard Model Paper 2021 with Practice Question Paper for both medium student of the country in board wide, hope you download and practice the question bank to get a better score in all exams.
2020年11月21日 19:51
For many people this is the best solution here see how to do it.
2020年11月22日 16:24
Students who are going to participate in Jawahar Navodaya Vidyalaya Selection Test 2020-2021, they can check the exam pattern and JNVST Class 6th Entrance Test syllabus here JNVST Model Paper 2021. With the help of syllabus of JNVST Entrance Exam for Class VI, students can start their preparation for the entrance test in time.
2020年11月27日 02:04
I read this article. I think You put a great deal of exertion to make this article. I like your work.
2020年11月28日 01:59
Beaver says I also have such interest, you can read my profile here:
2020年11月29日 01:51
I might suggest solely beneficial in addition to trusted facts, and so find it:
2020年12月02日 19:21
I understand this column. I realize You put a many of struggle to found this story. I admire your process.
2020年12月06日 17:22
Your texts on this subject are correct, see how I wrote this site is really very good.
2020年12月06日 17:37
On that website page, you'll see your description, why not read through this.
2020年12月06日 19:45
Here you will learn what is important, it gives you a link to an interesting web page:
2020年12月06日 19:57
I use basically superior fabrics : you will discover these products by:
2020年12月06日 23:37
TBSE 12th Question Paper 2021: Tripura Board Mock question papers are designed keeping in view the difficulty level of examination so that all of you after practising these could get the desired outcomes. Today the toughness level of board exams is increasing day by day, which is quite obvious as well TBSE 12th Question Paper 2021. Thus in order to beat the toughness of the exams as well as to score the highest marks, it is very mandatory to practice on Mock test papers. As per findings, the reason behind such a scenario is poor attention towards practice papers. Moreover, as per counsellers advise, those students who practice on mock question papers/ TBSE Class 12 Question Paper their chances to secure better marks are higher in comparison to those who haven’t opted for the same.
2020年12月10日 22:09
I wrote about a similar issue, I give you the link to my site. best copier
2020年12月14日 17:40
You bear through a awesome vacancy. I sanity definitely quarry it moreover personally suggest to my buddys. I am self-possessed they determination be benefited from this scene.
2020年12月15日 03:27
I wrote about a similar issue, I give you the link to my site.
2020年12月16日 23:16
This is very interesting, but it is necessary to click on this link:
2020年12月16日 23:40
These you will then see the most important thing, the application provides you a website a powerful important internet page:
2020年12月17日 20:24
It is fine, nonetheless evaluate the information and facts around this correct.
2020年12月17日 21:45
On that website page, you'll see your description, why not read through this.
2020年12月19日 19:36
I have a similar interest this is my page read everything carefully and let me know what you think.
2021年5月10日 23:00
Good info I need this, super, thanks for the introduction, I have been looking for such information for a long time to use on the online casino site https://jennycasino.com/
2022年9月28日 01:42
Board of Secondary Education, Assam is known as SEBA is conducted the English subject examination tests along with all examination tests for all government and private schools General curriculum and vocational course students as Unit Tests, Term, three months (Quarterly), SEBA 10th English Model Paper six months (Half Yearly), Pre-Final and annual final public examination tests to the academic year of 2023.