码迷,mamicode.com
首页 >  
搜索关键字:usaco 2008 jan gold    ( 2857个结果
USACO Healthy Holsteins
题目大意:要你求一个食材序列,使得用的食材最少,并且满足奶牛所有维他命需求思路:一开始感觉神题啊!不会捉!然后无意撇到食材总共15个......暴力大法好 1 /*{ 2 ID:a4298442 3 PROB:holstein 4 LANG:C++ 5 } 6 */ 7 #include 8 #in...
分类:其他好文   时间:2015-03-07 15:27:02    阅读次数:118
USACO Sorting a Three-Valued Sequence
题目大意:给你一个只有1 2 3 的序列,要你排序,每次可以交换任意两个元素,问最小交换次数是多少思路:贪心,先排1 ,如果1已经在位置上了,那就不要动了,如果是2那就和最前面的1交换,如果是3,那就和后面的1交换 1 /*{ 2 ID:a4298442 3 PROB:sort3 4 LANG:C+...
分类:其他好文   时间:2015-03-07 13:51:39    阅读次数:109
VMware Coding Challenge: The Heist
类似BackpackII问题 1 static int maximize_loot(int[] gold, int[] silver) { 2 int[][] res = new int[gold.length+silver.length+1][10001]; 3 ...
分类:系统相关   时间:2015-03-07 06:16:13    阅读次数:251
USACO Ordered Fractions
题目大意:求一个n的farey序列思路:懒得麻烦的推导和公式了,暴力压倒一切/*{ID:a4298442PROB:frac1LANG:C++}*/#include#include#include#include#define maxn 160*160+10using namespace std;if...
分类:其他好文   时间:2015-03-06 23:35:50    阅读次数:127
USACO 2.1 The Castle
题目大意:给你一个城堡让你求有多少房间,最大房间有多大,敲掉一堵墙后最大的房间有多大,敲掉那座墙思路:比较恶心的bfs题,反正就是bfs使劲敲/*{ID:a4298442PROB:castleLANG:C++}*/#include#include#include#include#include#de...
分类:其他好文   时间:2015-03-06 23:34:24    阅读次数:215
USCO--1.2Dual Palindromes
基本思路同上一题一样,改改上一题的代码就能过了代码如下:/* ID: 15674811 LANG: C++ TASK: dualpal */#include #include #include #include using namespace std;ofstream fout("dualpal.out"); ifstream...
分类:其他好文   时间:2015-03-06 22:17:28    阅读次数:182
USACO--1.2Palindromic Squares
水题,任意进制转换+回文判断 头脑不太清晰,代码写的很乱。。。。。代码如下:/* ID: 15674811 LANG: C++ TASK: palsquare */#include #include #include #include using namespace std;ofstream fout("palsquare.o...
分类:其他好文   时间:2015-03-06 19:14:53    阅读次数:134
[教育]Singapore plans to introduce programming lessons in public schools to boost the economy
Singapore plans to introduce programming lessons in public schools to boost the economyTerence Lee2:38 pm on Jan 14, 2014Follow @terenceleejxUpdate on...
分类:其他好文   时间:2015-03-06 10:32:44    阅读次数:155
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!