- 博客(7)
- 收藏
- 关注
原创 递归生成全排列算法
递归生成全排列算法:void perm2(int *arg,int n,int k){ int i; if(k>=n) { //print } else { for(i = k;i < n;++i) { swap(arg[i],arg[k]); perm1(arg,n,k+1); swap(arg[i],arg[k]); ...
2018-11-11 20:26:38
1246
原创 二分查找(HDU 2141 )
Can you find it?Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 27535 Accepted Submission(s): 6920Problem DescriptionGive you th
2017-02-19 10:15:46
444
原创 隐藏比较深的模拟题1003: UC Browser
1003: UC BrowserTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 1912 Solved: 644[Submit][Status]DescriptionBrother Xi has recently bought a smart mobile phone. Nowhe surfs Internet by hi
2017-02-15 11:19:56
464
原创 动态规划UVA 580
题目大意就是,对于输入的n,nf(3)=1,111f(4)=3,0111,1110,1111f(5)=8,11100,11101,11110,11111,01110,01111,10111,00111等等。。。题目:During the early stages of the Manhattan Project, the dangers of the new rad
2017-02-15 10:31:40
330
原创 动态规划初步csu 1587
Welcome!1587: 爬楼梯Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 649 Solved: 357[Submit][Status]Description小时候我们都玩过爬楼梯的游戏:两人猜拳,赢了可向上爬一级,谁先到最高级则获胜。作为大学生,我们应该玩一个更有水平的游戏。现在一个人要上n级楼梯
2017-02-15 09:52:50
352
原创 三道acm基础题 CSU-1000.1001.1002
1000: A+B (I)Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 6295 Solved: 1753[Submit][Status]DescriptionYour task is to Calculate a + b.InputInput contains multiple test cases. Each
2017-02-13 10:26:39
512
原创 SDUTOJ 2073 —— 活动选择问题
题目描述 sdut 大学生艺术中心每天都有n个活动申请举办,但是为了举办更多的活动,必须要放弃一些活动,求出每天最多能举办多少活动。输入15 2015 198 1810 154 146 125 102 93 80 73 41 3示例输出5 这个题利用的是贪心算法,也可是动态规划的方法来解决,不过这里我用的贪心算法,
2017-02-13 09:58:36
751
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人