上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: 题目描述在图论中,包含n个结点(结点编号为1~n)、n-1条边的无向连通图被称为树。 在树中,任意一对结点间的简单路径总是惟一的。 你拥有一棵白色的树——所有节点都是白色的。接下来,你需要处理c条指令: 修改指令(0 v):改变一个给定结点的颜色(白变黑,黑变白); 查询指令(1 v):询问从结点1... 阅读全文
posted @ 2014-06-21 23:12 Hust_BaoJia 阅读(296) 评论(0) 推荐(0) 编辑
摘要: 题目描述Given a non-negative integer sequence A with length N, you can exchange two adjacent numbers each time. After K exchanging operations, what’s the ... 阅读全文
posted @ 2014-06-20 20:25 Hust_BaoJia 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 题目描述There are a bunch of stones on the beach; Stone color is white or black. Little Sheep has a magic brush, she can change the color of a continuous ... 阅读全文
posted @ 2014-06-20 19:25 Hust_BaoJia 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 题目描述Up to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end,... 阅读全文
posted @ 2014-06-20 13:24 Hust_BaoJia 阅读(169) 评论(0) 推荐(0) 编辑
摘要: DescriptionChosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we get a new proble... 阅读全文
posted @ 2014-06-20 13:19 Hust_BaoJia 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 题目描述It'sYy'sbirthday, and his friends decided to buy him a copy ofXianJianQiXiaZhuanV.Since some of friends have more money available than others, nob... 阅读全文
posted @ 2014-06-18 18:55 Hust_BaoJia 阅读(126) 评论(0) 推荐(0) 编辑
摘要: DescriptionAn integer interval [a,b], a #include#include#include#include#include#include#include#includeusing namespace std;const int maxn=10000+10;st... 阅读全文
posted @ 2014-06-16 15:37 Hust_BaoJia 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 题目描述给定一个字符串s,求出一个子串t,满足如下性质:1.t是s的一个前缀。2.t是s的一个后缀。3.t出现在s的中间(并非前缀和后缀)。例如:字符串s为fixprefixsuffix,t可以是fix。字符串s为aaa,t可以是aa。输入输入包括多组数据,每组数据为一行,每行有一个字符串s,其长度... 阅读全文
posted @ 2014-06-15 11:32 Hust_BaoJia 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 题目描述给定一个由英文字母组成的字符串,求出一个子串,满足如下要求:该子串所包含的元音字母(a,e,i,o,u)的个数不大于辅音字母的个数的两倍。你的任务是找到最长的满足要求的子串,输出其长度,并且输出最长的满足条件的子串的个数(区分2个子串是否不同的因素是起始位置和长度)。输入输入包括多组数据,每... 阅读全文
posted @ 2014-06-14 19:44 Hust_BaoJia 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 题目描述You are given N baskets of gold coins. The baskets are numbered from 1 to N. In all except one of the baskets, each gold coin weighs w grams. In t... 阅读全文
posted @ 2014-06-14 10:51 Hust_BaoJia 阅读(166) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
努力