自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(80)
  • 收藏
  • 关注

转载 C - Snuke Festival

原题地址:http://abc077.contest.atcoder.jp/tasks/arc084_a; Time limit: 2sec /Memory limit: 256MB Score :300points Problem Statement The season for Snuke Festival has come again this year....

2017-11-05 21:41:00 147

转载 C - Palindromic Matrix

原题地址:http://code-festival-2017-quala.contest.atcoder.jp/tasks/code_festival_2017_quala_c Time limit: 2sec /Memory limit: 256MB Score :400points Problem Statement We have anH-by-Wma...

2017-10-29 10:01:00 144

转载 B - fLIP

原题地址:http://code-festival-2017-quala.contest.atcoder.jp/tasks/code_festival_2017_quala_b Time limit: 2sec /Memory limit: 256MB Score :200points Problem Statement We have a grid with...

2017-10-29 09:02:00 120

转载 D - Restoring Road Network

原题地址:http://abc074.contest.atcoder.jp/tasks/arc083_b Time limit: 2sec /Memory limit: 256MB Score :500points Problem Statement In Takahashi Kingdom, which once existed, there areNci...

2017-10-29 08:41:00 124

转载 C - Sugar Water

原题地址:http://abc074.contest.atcoder.jp/tasks/arc083_a Time limit: 3sec /Memory limit: 256MB Score :300points Problem Statement Snuke is making sugar water in a beaker. Initially, the ...

2017-10-27 15:24:00 169

转载 D - joisino's travel

原题地址:http://abc073.contest.atcoder.jp/tasks/abc073_d Time limit: 2sec /Memory limit: 256MB Score :400points Problem Statement There areNtowns in the State of Atcoder, connected by...

2017-10-26 20:50:00 128

转载 数位DP模板

模板1: // pos = 当前处理的位置(一般从高位到低位) // pre = 上一个位的数字(更高的那一位) // status = 要达到的状态,如果为1则可以认为找到了答案,到时候用来返回, //    给计数器+1。 // limit = 是否受限,也即当前处理这位能否随便取值。如567,当前处理6这位, /...

2017-10-15 20:59:00 50

转载 bridge

Time limit: 2sec /Memory limit: 256MB Score :300points Problem Statement You are given an undirected connected graph withNvertices andMedges that does not contain self-loops and d...

2017-10-15 15:14:00 72

转载 大数乘法

给出2个大整数A,B,计算A*B的结果。 Input 第1行:大数A 第2行:大数B (A,B的长度<=1000,A,B>=0) Output 输出A*B Input示例 123456 234567 Output示例 28958703552解法:第i位数乘第j位数,乘积是第i+j位数(从0开始)如123*456...

2017-09-10 09:44:00 83

转载 魔法跳舞链 51Nod - 1640

51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。 N名魔法师按阵法站好,之后选取N - 1条魔法链将所有魔法师的魔力连接起来,形成一个魔法阵。 魔法链是做法成功与否的关键。每一条魔法链都有一个魔力值V,魔法最终的效果取决于阵中所有魔法链的魔力值的和。 由于逆天改命的魔法过于暴力,所以我们要求阵中的魔法链的魔力值最大值尽可能的小,与此同时,魔力值之和...

2017-09-05 15:17:00 56

转载 二进制的难题 51Nod - 1413

一个十进制整数被叫做权势二进制,当他的十进制表示的时候只由0或1组成。例如0,1,101,110011都是权势二进制而2,12,900不是。 当给定一个n的时候,计算一下最少要多少个权势二进制相加才能得到n。 Input单组测试数据。第一行给出一个整数n (1<=n<=1,000,000)Output输出答案占一行。Sample Input 9 Sample Out...

2017-09-05 12:53:00 146

转载 Halloween Costumes

Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Halloween, these parties are all costume parties...

2017-08-16 20:48:00 56

转载 Investment

John never knew he had a grand-uncle, until he received the notary's letter. He learned that his late grand-uncle had gathered a lot of money, somewhere in South-America, and that John was the on...

2017-08-16 20:41:00 69

转载 The Fewest Coins

Farmer John has gone to town to buy some farm supplies. Being a very efficient man, he always pays for his goods in such a way that the smallest number of coins changes hands, i.e., the number ...

2017-08-16 20:33:00 130

转载 Bone Collector II

The title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" competition,you must have seem this title.If you haven't seen it before,it doesn't matter,I will give ...

2017-08-16 20:25:00 56

转载 Cow Exhibition

"Fat and docile, big and dumb, they look so stupid, they aren't muchfun..."- Cows with Guns by Dana LyonsThe cows want to prove to the public that they are both smart and fun. In order to do t...

2017-08-16 20:21:00 63

转载 饭卡

电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。 Input多组数据。对于每组数据:第一行为正...

2017-08-16 20:13:00 80

转载 A + B Problem II

给定两个整数A和B,求出二者的和。Input The first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines follow, each line consists of two positive integers, A...

2017-08-16 20:07:00 45

转载 F - Problem F( 线段树 )

度熊手上有一本字典存储了大量的单词,有一次,他把所有单词组成了一个很长很长的字符串。现在麻烦来了,他忘记了原来的字符串都是什么,神奇的是他竟然记得原来那些字符串的哈希值。一个字符串的哈希值,由以下公式计算得到: H(s)=∏i≤len(s)i=1(Si−28)(mod9973)SiSi代表 S[i] 字符的 ASCII 码。请帮助度熊计算大字符串中任意一段的哈希值是多少。 ...

2017-08-16 20:03:00 48

转载 敌兵布阵

Lily特别喜欢养花,但是由于她的花特别多,所以照料这些花就变得不太容易。她把她的花依次排成一行,每盆花都有一个美观值。如果Lily把某盆花照料的好的话,这盆花的美观值就会上升,如果照料的不好的话,这盆花的美观值就会下降。有时,Lily想知道某段连续的花的美观值之和是多少,但是,Lily的算术不是很好,你能快速地告诉她结果吗?Input 第一行一个整数T,表示有T组测试数据。 每组测...

2017-08-16 19:49:00 78

转载 继续畅通工程

省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。 Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 1< N < 100 );随后的 N(...

2017-08-16 19:45:00 89

转载 畅通工程续

某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路多了也不好,每次要从一个城镇到另一个城镇时,都有许多种道路方案可以选择,而某些方案要比另一些方案行走的距离要短很多。这让行人很困扰。现在,已知起点和终点,请你计算出要从起点到终点,最短需要行走多少距离。 Input本题目包含多组数据,请处理到文件结束。每组数据第一行包含两个正整数N和M(0<N<200,0...

2017-08-16 19:38:00 87

转载 J - I Hate It HDU - 1754

很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M&lt...

2017-08-16 19:34:00 67

转载 H - Hat’s Words HDU - 1247

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’s words in a dictionary. InputStandard input consi...

2017-08-16 19:32:00 127

转载 The Suspects ( 非典与传染 )

Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is...

2017-08-10 15:03:00 139

转载 G - Wormholes

While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time...

2017-08-08 07:46:00 64

转载 F - Til the Cows Come Home

Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to ...

2017-08-08 07:42:00 50

转载 E - Frogger

Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists...

2017-08-08 07:42:00 75

转载 D - Currency Exchange

Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. Ther...

2017-08-08 07:36:00 79

转载 C - Highways

The island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this problem. They'r...

2017-08-06 13:51:00 87

转载 B - 畅通工程再续

相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRush对百岛湖的情况充分了解后,决定在符合条件的小岛间建上桥,所谓符合条件,就是2个小岛之间的距离不能小于10米,也不能大于1000米。当然,为了节省资金,只要求实现...

2017-08-06 10:59:00 82

转载 A - 还是畅通工程

某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。 Input测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离,每行给...

2017-08-06 10:51:00 86

转载 F - Problem F ( 抛物线求最小值) :UVALive - 5009

Josephina is a clever girl and addicted to Machine Learning recently. She pays much attention to a method called Linear Discriminant Analysis, which has many interesting properties. In order to ...

2017-08-05 14:43:00 149

转载 4 Values whose Sum is 0 :POJ - 2785

The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b + c + d = 0 . In the fol...

2017-08-05 09:59:00 45

转载 E - Problem E ( 吃糖) :HDU - 1205

HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。 Input第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数N(0<N<=1000000),...

2017-08-05 09:25:00 93

转载 B - Problem B (最小公倍数) :HDU - 1019

The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15 is 105. In...

2017-08-05 09:19:00 57

转载 A - Problem A (字符串的转换) : CodeForces - 591B

The name of one small but proud corporation consists ofnlowercase English letters. The Corporation has decided to try rebranding— an active marketing strategy, that includes a set of measures ...

2017-08-05 09:13:00 103

转载 最长上升子序列 CSU - 1047 ( LIS LCS )

名词解释: 一串数字比如1、5、3、6、9、8、10,它的子序列是从左到右不连续的若干个数,比如1、5、6,3、9、8、10都是它的子序列。 最长上升子序列即从左到右严格增长的最长的一个子序列,1、5、6、9、10就是这个序列的一个最长上升子序列。 给出若干序列,求出每个序列的最长上升子序列长度。 Input 多组数据,每组第一行正整数n,1 <= n <= 1...

2017-08-03 08:36:00 60

转载 L - Unique Snowflakes ( 包装雪花 )

Emily the entrepreneur has a cool business idea: packaging and selling snowflakes. She has devised a machine that captures snowflakes as they fall, and serializes them into a stream of snowflakes...

2017-08-02 15:43:00 72

转载 I - Olympiad

You are one of the competitors of the Olympiad in numbers. The problem of this year relates to beatiful numbers. One integer is called beautiful if and only if all of its digitals are different (...

2017-08-02 10:05:00 104

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除