上一页 1 ··· 6 7 8 9 10 11 下一页
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 typedef struct TrieNode{ 5 bool flag; 6 TrieNode *next[26]; 7 TrieNode(){ 8 flag = false; 9 memse 阅读全文
posted @ 2017-01-12 22:04 Robin! 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a sequence a[1],a[2],a[3]……a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in th 阅读全文
posted @ 2017-01-11 20:10 Robin! 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 题目: Marsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles 阅读全文
posted @ 2017-01-11 17:23 Robin! 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 题目: 大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101) 阅读全文
posted @ 2017-01-10 01:55 Robin! 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 题目: 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input 输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多 阅读全文
posted @ 2017-01-09 18:53 Robin! 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 模板1: 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 void InitNext(char *s, int *next){ 5 int i = 0, j = -1, len = strlen(s); 6 next[0] = -1; 7 w 阅读全文
posted @ 2017-01-09 12:37 Robin! 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 题目: The famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. The floor has 200 rooms 阅读全文
posted @ 2017-01-08 14:53 Robin! 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目: 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度 阅读全文
posted @ 2017-01-07 20:36 Robin! 阅读(83) 评论(0) 推荐(0) 编辑
摘要: 题目: 通过悬崖的yifenfei,又面临着幽谷的考验—— 幽谷周围瘴气弥漫,静的可怕,隐约可见地上堆满了骷髅。由于此处长年不见天日,导致空气中布满了毒素,一旦吸入体内,便会全身溃烂而死。 幸好yifenfei早有防备,提前备好了解药材料(各种浓度的万能药水)。现在只需按照配置成不同比例的浓度。 现 阅读全文
posted @ 2017-01-07 17:29 Robin! 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 题目: 某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出 阅读全文
posted @ 2017-01-07 14:59 Robin! 阅读(115) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 下一页