穷竭搜索
RPG_Zero
春日雨,夏蝉鸣,明天是个好天气。
秋风起,雪花轻,海底看不见四季。
展开
-
POJ3050 Hopscotch 穷举搜索 DFS Map容器再尝试
Description The cows play the child’s game of hopscotch in a non-traditional way. Instead of a linear set of numbered boxes into which to hop, the cows create a 5x5 rectilinear grid of digits paralle...原创 2019-08-02 16:52:39 · 183 阅读 · 0 评论 -
POJ 2718 Smallest Difference 全排列函数next_permutation再尝试
Description Given a number of distinct decimal digits, you can form one integer by choosing a non-empty subset of these digits and writing them in some order. The remaining digits can be written down...原创 2019-07-31 15:00:09 · 156 阅读 · 0 评论 -
Osenbei AOJ 0525 DFS 穷竭搜索
题目大意是讲一个烧饼铺,在一个n * m (1<=n<=10,1<=m<=10000)的烤桌上面摆着一堆烧饼,数字1表示烧饼正面,0表示烧饼反面。然后你每次可以将一整行或者一整列的烧饼翻面,即正面翻成反面或者反面翻成正面。但是必须是一整列或者一整行的翻,问最多可以使都少烧饼翻成正面? Sample input 2 5 0 1 0 1 0 1 0 0 0 1 3 6 1 0...原创 2019-08-05 08:11:20 · 178 阅读 · 0 评论 -
POJ3187 Backward Digit Sums 暴力搜索
Description FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 <= N <= 10) in a certain order and then sum adjacent numbers to produce a new list with one f...原创 2019-08-02 08:57:15 · 148 阅读 · 0 评论 -
POJ 1930 Dead Fraction 无限循环小数化分数 数论+枚举
题目链接 Description Mike is frantically scrambling to finish his thesis at the last minute. He needs to assemble all his research notes into vaguely coherent form in the next 3 days. Unfortunately, he n...原创 2019-08-27 11:26:10 · 314 阅读 · 0 评论 -
阶乘除法 CSU1781 暴力搜索
题目链接 Time limit5000 ms Memory limit131072 kB Source湖南省第十一届大学生计算机程序设计竞赛 输入两个正整数 n, m,输出 n!/m!,其中阶乘定义为 n!= 123*…*n (n>=1)。 比如,若 n=6, m=3,则 n!/m!=6!/3!=720/6=120。 是不是很简单?现在让我们把问题反过来:输入 k=n!/m!,找到...原创 2019-08-31 20:41:26 · 149 阅读 · 0 评论