传送门: http://acm.hdu.edu.cn/showproblem.php?pid=1027 Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 10388    Accepted Submission(s): 5978 Problem Description Now our…
Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4865    Accepted Submission(s): 2929 Problem Description Now our hero finds the door to the BEelzebub feng5166. He o…
Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4865    Accepted Submission(s): 2929 Problem Description Now our hero finds the door to the BEelzebub feng5166. He o…
Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6359    Accepted Submission(s): 3760 Problem Description Now our hero finds the door to the BEelzebub feng5166. He o…
Ignatius and the Princess II Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6362    Accepted Submission(s): 3763 Problem Description Now our hero finds the door to the BEelzebub feng5166. He o…
Ignatius and the Princess IV 点我跳转到题面 点我一起学习STL-MAP 题意分析 给出一个奇数n,下面有n个数,找出下面数字中出现次数大于(n+1)/2的数字,并输出. 用map做出映射,然后迭代器检查是否满足输出条件,是的话输出即可. 代码总览 /* Title:HDOJ.1029 Author:pengwill Date:2016-11-21 */ #include <iostream> #include <stdio.h> #include &l…
Ignatius and the Princess III Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9532    Accepted Submission(s): 6722 Problem Description "Well, it seems the first problem is too easy. I will let y…
题意:产生第m大的排列 思路:使用 next_permutation函数(头文件algorithm) #include<iostream> #include<stdio.h> #include<algorithm> using namespace std; int main(){ ],n,m,i; while(~scanf("%d%d",&n,&m)){ ;i<=n;++i)a[i]=i; ;i<m;++i)next_pe…
题意: 给N和M. 输出1,2,...,N的第M大全排列. 思路: 将M逆康托,求出a1,a2,...aN. 看代码. 代码: int const MAXM=10000; int fac[15]; int ans[1005]; int kk; int n,m; vector<int> pq; int main(){ int cn=0; fac[0]=1; while(1){ ++cn; fac[cn]=fac[cn-1]*cn; if(fac[cn]>MAXM){ --cn; break…
转载请注明出处:http://blog.csdn.net/u012860063 题目链接:http://acm.hdu.edu.cn/showproblem.php? pid=1027 Ignatius and the Princess II Problem Description Now our hero finds the door to the BEelzebub feng5166. He opens the door and finds feng5166 is about to kill…