自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

x_ring的博客

小菜鸟成长记录

  • 博客(22)
  • 收藏
  • 关注

原创 Ada and Queue

Ada and Queue Ada the Ladybug has many things to do. She puts them into her queue. Anyway she is very indecisive, so sometime she uses the top, sometime the back and sometime she decides to re

2017-04-08 20:36:56 320

原创 Seinfeld

Seinfeld I’m out of stories. For years I’ve been writing stories, some rather silly, just to make simple problems look difficult and complex problems look easy. But, alas, not for this one.Y

2017-04-08 20:31:59 289

原创 最高的奖励

最高的奖励 有N个任务,每个任务有一个最晚结束时间以及一个对应的奖励。在结束时间之前完成该任务,就可以获得对应的奖励。完成每一个任务所需的时间都是1个单位时间。有时候完成所有任务是不可能的,因为时间上可能会有冲突,这需要你来取舍。求能够获得的最高奖励。Input第1行:一个数N,表示任务的数量(2 Output输出能够获得的最高奖励。Sample Input

2017-04-08 20:26:50 251

原创 The Double HeLiX

The Double HeLiX Two finite, strictly increasing, integer sequences are given. Any common integer between the two sequences constitute an intersection point. Take for example the following

2017-04-08 20:19:56 301

原创 AVL树的种类

AVL树的种类 平衡二叉树(AVL树),是指左右子树高度差至多为1的二叉树,并且该树的左右两个子树也均为AVL树。 现在问题来了,给定AVL树的节点个数n,求有多少种形态的AVL树恰好有n个节点。Input一行,包含一个整数n。 (0 Output一行表示结果,由于结果巨大,输出它对1000000007取余数的结果。Sample Input10S

2017-04-08 20:10:33 518

原创 Aibohphobia

Aibohphobia BuggyD suffers from AIBOHPHOBIA - the fear of Palindromes. A palindrome is a string that reads the same forward and backward.To cure him of this fatal disease, doctors from a

2017-04-08 20:07:59 344

原创 Alphacode

Alphacode Alice and Bob need to send secret messages to each other and are discussing ways to encode their messages:Alice: “Let’s just use a very simple code: We’ll assign ‘A’ the code wor

2017-04-06 22:15:58 268

原创 Buying Apples!

Buying Apples! Harish went to a supermarket to buy exactly ‘k’ kilograms apples for his ‘n’ friends. The supermarket was really weird. The pricing of items was very different. He went to the A

2017-04-06 22:14:37 240

原创 回文串划分

回文串划分 有一个字符串S,求S最少可以被划分为多少个回文串。例如:abbaabaa,有多种划分方式。a|bb|aabaa - 3 个回文串a|bb|a|aba|a - 5 个回文串a|b|b|a|a|b|a|a - 8 个回文串其中第1种划分方式的划分数量最少。Input输入字符串S(S的长度Output输出最少的划分数

2017-04-06 17:03:32 265

原创 数组的最大代价

数组的最大代价 数组A包含N个元素A1, A2......AN。数组B包含N个元素B1, B2......BN。并且数组A中的每一个元素Ai,都满足1   (公式表示所有两个相邻元素的差的绝对值之和)给出数组B,计算可能的最大代价S。Input第1行:1个数N,表示数组的长度(1 Output输出最大代价S。Sample Input51

2017-04-06 16:56:14 162

原创 编辑距离

编辑距离 编辑距离,又称Levenshtein距离(也叫做Edit Distance),是指两个字串之间,由一个转成另一个所需的最少编辑操作次数。许可的编辑操作包括将一个字符替换成另一个字符,插入一个字符,删除一个字符。例如将kitten一字转成sitting:sitten (k->s)sittin (e->i)sitting (->g)所以kitten和s

2017-04-06 16:53:54 125

原创 codeforces 792B - Counting-out Rhyme

codeforces 792B - Counting-out Rhyme n children are standing in a circle and playing the counting-out game. Children are numbered clockwise from 1 to n. In the beginning, the first child is co

2017-04-05 20:28:55 241

原创 codeforces 792A - New Bus Route

codeforces 792A - New Bus Route There are n cities situated along the main road of Berland. Cities are represented by their coordinates — integer numbers a1, a2, ..., an. All coordinates are

2017-04-05 20:24:32 326

原创 ZOJ - 3278 8G Island

ZOJ - 3278 8G Island 8g Island has N boys and M girls. Every person has a "charm value". When a boy with charm value t1 and a girl with charm value t2 get together, their "8g value" is t1*t2. Ev

2017-04-05 20:17:29 347

原创 ZOJ - 3166 Lazy Tourist

ZOJ - 3166 Lazy Tourist Fat Murphy is really a lazy guy. When he goes out for sightseeing, only he cared about is to get back to the hotel which he stayed in as soon as possible. Taday is the

2017-04-05 20:08:03 192

原创 codeforces787B-Not Afraid

codeforces787B-Not Afraid Since the giant heads have appeared in the sky all humanity is in danger, so allRicks and Mortys from all parallel universes are gathering in groups to find a solutio

2017-04-04 19:55:57 313

原创 codeforces787A-The Monster

codeforces787A-The Monster A monster is chasing after Rick and Morty on another planet. They're so frightened that sometimes they scream. More accurately, Rick screams at times b, b + a, b + 2

2017-04-04 19:55:11 261

原创 zoj 3167 Find 7 Faster Than John Von Neumann

Find 7 Faster Than John Von NeumannIt was said that when testing the first computer designed by von Neumann, people gave the following problem to both the legendary professor and the new compu

2017-04-04 19:45:35 212

原创 zoj3160Couples

zoj3160CouplesIn the world ofknowledge, so many new words appear on the internet. A special one is"8g", a kind of special relationship between two persons. (If youwant to know more words, just turn

2017-04-04 19:41:20 167

原创 HDU - 5686Problem B

HDU - 5686 Problem B度熊面前有一个全是由1构成的字符串,被称为全1序列。你可以合并任意相邻的两个1,从而形成一个新的序列。对于给定的一个全1序列,请计算根据以上方法,可以构成多少种不同的序列。Input这里包括多组测试数据,每组测试数据包含一个正整数NN,代表全1序列的长度。 1≤N≤2001≤N≤200Output对于每组测试数据,输出一个

2017-04-04 19:11:51 221

原创 HDU 5685 Problem A

HDU 5685 Problem A 度熊手上有一本字典存储了大量的单词,有一次,他把所有单词组成了一个很长很长的字符串。现在麻烦来了,他忘记了原来的字符串都是什么,神奇的是他竟然记得原来那些字符串的哈希值。一个字符串的哈希值,由以下公式计算得到: H(s)=∏i≤len(s)i=1(Si−28) (mod 9973)H(s)=∏i=1i≤len(s)(Si−28) (

2017-04-04 19:05:55 564

原创 Cut The Cake

Cut The CakeLi Lei and Han Meimei love each other so much that they can not be separated for even one minute. They have promised each other to share all the happy things and delicious foods. In

2017-04-04 18:46:15 576

空空如也

空空如也

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

TA关注的人

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