摘要: "原题链接" 描述 某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。 现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 输入 本题目 阅读全文
posted @ 2018-02-02 22:58 HackHarry 阅读(103) 评论(0) 推荐(0) 编辑
摘要: "原题链接" 描述 小鱼儿吐泡泡,嘟嘟嘟冒出来。小鱼儿会吐出两种泡泡:大泡泡"O",小泡泡"o"。 两个相邻的小泡泡会融成一个大泡泡,两个相邻的大泡泡会爆掉。 (是的你没看错,小气泡和大气泡不会产生任何变化的,原因我也不知道。) 注意:自左到右进行合并. 例如:ooOOoooO经过一段时间以后会变成 阅读全文
posted @ 2018-02-01 22:38 HackHarry 阅读(182) 评论(0) 推荐(0) 编辑
摘要: "原题链接" 描述 In chapter 4 of the game Trails in the Sky SC, Estelle Bright and her friends are crossing Mistwald to meet their final enemy, Lucciola. Mis 阅读全文
posted @ 2018-02-01 15:32 HackHarry 阅读(85) 评论(0) 推荐(0) 编辑
摘要: "原题链接" 描述 Evolution is a long, long process with extreme complexity and involves many species. Dr. C. P. Lottery is currently investigating a simplifi 阅读全文
posted @ 2018-02-01 15:15 HackHarry 阅读(95) 评论(0) 推荐(0) 编辑
摘要: "" 描述 Lele now is thinking about a simple function f(x). If x = 10 f(x) = a0 f(x 1) + a1 f(x 2) + a2 f(x 3) + …… + a9 f(x 10); And ai(0 include define 阅读全文
posted @ 2018-01-31 17:03 HackHarry 阅读(142) 评论(0) 推荐(0) 编辑
摘要: "原题链接" 描述 Queues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our daily life. There 阅读全文
posted @ 2018-01-31 16:59 HackHarry 阅读(113) 评论(0) 推荐(0) 编辑
摘要: "原题链接" 描述 Given a n × n matrix A and a positive integer k, find the sum $S = A + A^{2} + A^{3} + … + A^{k}.$ 输入 The input contains exactly one test ca 阅读全文
posted @ 2018-01-31 16:43 HackHarry 阅读(131) 评论(0) 推荐(0) 编辑
摘要: "原题链接" 描述 A为一个方阵,则Tr A表示A的迹(就是主对角线上各项的和),现要求Tr(A^k)%9973。 输入 数据的第一行是一个T,表示有T组数据。 每组数据的第一行有n(2 define ll long long define maxn 10 using namespace std; 阅读全文
posted @ 2018-01-31 16:30 HackHarry 阅读(104) 评论(0) 推荐(0) 编辑
摘要: "原题链接" 描述 A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to find all the hat 阅读全文
posted @ 2018-01-31 16:22 HackHarry 阅读(98) 评论(0) 推荐(0) 编辑
摘要: "原题链接" 描述 When you go shopping, you can search in repository for avalible merchandises by the computers and internet. First you give the search system 阅读全文
posted @ 2018-01-30 17:36 HackHarry 阅读(101) 评论(0) 推荐(0) 编辑