码迷,mamicode.com
首页 >  
搜索关键字:usaco 2008 dec gold    ( 3262个结果
USACO Section 2.1 The Castle
/* ID: lucien23 PROG: castle LANG: C++ */ /************************************************************************/ /* 求图的连通域问题,利用广度扫描 */ /******...
分类:其他好文   时间:2014-07-19 02:41:25    阅读次数:226
USACO Section 2.1 Ordered Fractions
/* ID: lucien23 PROG: frac1 LANG: C++ */ #include #include #include #include using namespace std; typedef struct Fraction { int numerator; int denominator; Fraction(){} Fraction(int x, int y...
分类:其他好文   时间:2014-07-19 02:31:25    阅读次数:199
USACO Section 2.1 Sorting a Three-Valued Sequence
/* ID: lucien23 PROG: sort3 LANG: C++ */ #include #include #include #include using namespace std; void exchange(int nums[], int begin, int end, int N, int x); int sum = 0; int main() { ifstream ...
分类:其他好文   时间:2014-07-19 02:12:25    阅读次数:176
linux下常用的日志分析命令
linux下常用的日志分析命令本文介绍下,在linux中常用的一些分析日志的命令行或脚本,有需要的朋友参考下。形如下面这样的access.log日志内容: 211.123.23.133 – - [10/Dec/2010:09:31:17 +0800] “GET /query/trendxml/dis...
分类:系统相关   时间:2014-07-18 23:28:43    阅读次数:359
递归实现二进制转十进制
题目:应用递归,将输入的二进制数转换为十进制。#include #include void binary_to_decimal(char *s, long dec){ if( *s == '\0' ) printf("Decimal: %ld\n",dec); else ...
分类:其他好文   时间:2014-07-18 18:23:50    阅读次数:217
(Step1-500题)UVaOJ+算法竞赛入门经典+挑战编程+USACO
下面给出的题目共计560道,去掉重复的也有近500题,作为ACMer Training Step1,用1年到1年半年时间完成。打牢基础,厚积薄发。一、UVaOJhttp://uva.onlinejudge.org西班牙Valladolid大学的程序在线评测系统,是历史最悠久、最著名的OJ。二、《算法...
分类:其他好文   时间:2014-07-18 11:39:04    阅读次数:483
[POJ 1390]Blocks
Description Some of you may have played a game called 'Blocks'. There are n blocks in a row, each box has a color. Here is an example: Gold, Silver, Silver, Silver, Silver, Bronze, Bronze, Bronze, Go...
分类:其他好文   时间:2014-07-18 11:23:05    阅读次数:280
USACO cowtour Floyd + 枚举
给出来的数据量还是可以的。题意:有若干个牧场,至少有两个不连通,一个牧场的直径就是牧场中最远的两个牧区的距离。要求找出几个牧场中最短的直径,就是找一条路径连接几个牧区,使这个直径最终最小。 基本方法,把整个图根据输入划分成几个不连通的牧区,然后求出每个牧区的直径(即每个连通块中的最长路径),然后枚举两个不在同一牧区的点,设blocks[i]记录第i个节点所在连通块的直径,那么result = m...
分类:其他好文   时间:2014-07-18 11:04:46    阅读次数:287
C++输入流与输出流中使用控制符
dec--设置数值的基数为10hex--设置数值的基数为16oct--设置数值的基数为8setfill(c)--设置填充字符c,c可以是字符常量,也可以是字符变量setprecision(n)--设置浮点数的精度为n位,一般以十进制小数位输出,n代表有效数字,在以fixed(固定小数位数)和scie...
分类:编程语言   时间:2014-07-17 21:32:37    阅读次数:250
[POI 2001+2014acm上海邀请赛]Gold Mine/Beam Cannon 线段树+扫描线
Description  Byteman, one of the most deserving employee of The Goldmine of Byteland, is about to retire by the end of the year. The Goldmine management would like to reward him in acknowledgment...
分类:其他好文   时间:2014-07-17 10:24:12    阅读次数:307
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!