码迷,mamicode.com
首页 >  
搜索关键字:uva 11995    ( 8022个结果
uva 10276 / pc 110908
黑书上说用二分图的知识来解,但我想不出来,只好找规律发现,一条柱时为1,两条柱时为4。三条柱时为8。。这些1,3,7,11的数字加1后,都是下一条柱的最底部的数字,而且一条柱的数字之和总是按照这样的规律。1^2,2^2,3^2,4^2......所以。。 1 #include 2 #include....
分类:其他好文   时间:2014-06-29 00:32:08    阅读次数:294
uva 704
自己之前的不见了。。这题是双向广搜即可过。。 1 // Colour Hash (色彩缤纷游戏) 2 // PC/UVa IDs: 110807/704, Popularity: B, Success rate: average Level: 3 3 // Verdict: Accepted ...
分类:其他好文   时间:2014-06-28 20:42:53    阅读次数:194
UVa Problem 10051
这题有点类似LIS,由于颜色最多100种,所以只需建立一个100的数组,按对立面的关系以某种颜色为向上面的最大值就可以了。 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int cube[505][7]; 7 int ...
分类:其他好文   时间:2014-06-21 12:58:02    阅读次数:244
UVa1587.Digit Counting
题目连接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=247&page=show_problem&problem=3666137646221225Digit CountingAccepte...
分类:其他好文   时间:2014-06-21 10:53:16    阅读次数:365
Uva227.Puzzle
题目连接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=163#ProblemVerdictLanguageRun TimeSubmission Date1...
分类:其他好文   时间:2014-06-20 20:23:12    阅读次数:365
uva 11997 (基础数据结构)
题意: 有一个k*k 的方阵,让你从当中每一行挑选一个数字相加最后能得到K^K次方的和,输出其中最小的k个。思路:先对每一行排序然后两两归并,每次取前k个再和下一行再进行归并。在归并的时候用一个优先队列维护最大的k个值每次先放k个进去然后一次每行和队顶比较,若是小则替换否则break最后输出即可。代...
分类:其他好文   时间:2014-06-18 17:46:28    阅读次数:142
UVA 11205 The broken pedometer(子集枚举)
Description  The Broken Pedometer  The Problem A marathon runner uses a pedometer with which he is having problems. In the pedometer the symbols are represented by seven s...
分类:其他好文   时间:2014-06-18 12:31:09    阅读次数:203
UVA 146 ID Codes(下一个排列)
C - ID Codes Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Submit Status Appoint description:  System Crawler  (2014-05-12) Description  ID Cod...
分类:其他好文   时间:2014-06-18 11:30:56    阅读次数:283
uva 10245 最近点对问题
分治法的典例 当练手了 神奇的是,使用inplace_merge按说应该是O(n)的算法,但是用sort nlogn的算法反而更快 先上快排版 #include #include #include #include #include using namespace std; const int SIZE = 10000+10; const double INF = 1...
分类:其他好文   时间:2014-06-18 07:17:22    阅读次数:170
UVA 10090 - Marbles (数论)
UVA 10090 - Marbles 题目链接 题意:有两种盒子,一种代价c1,能装n1个珠子,一种代价c2,能装n2个珠子,问如何正好装n个珠子,并且使得代价最少。 思路:利用扩展欧几里得算法求出n1?x+n2?y=n的一个解(x′,y′) 就可以知道x,y的通解分别为 x=x′?n/gcd(n1,n2)+n2/gcd(n1,n2)?t y=y′?n/gac(n1,n2)?...
分类:其他好文   时间:2014-06-18 00:44:40    阅读次数:182
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!