自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(35)
  • 资源 (2)
  • 收藏
  • 关注

原创 C - Cheap Kangaroo

There are N kangaroos going out to eat at an Indian restaurant. The ith kangaroo wants to eat exactly xi food. The kangaroos all want to order the same size of plates, but each one can order more than...

2018-04-25 21:09:58 327

原创 走迷宫

走迷宫Time Limit: 1000 msMemory Limit: 65536 KiBProblem Description有一个m*n格的迷宫(表示有m行、n列),其中有可走的也有不可走的,如果用1表示可以走,0表示不可以走,输入这m*n个数据和起始点、结束点(起始点和结束点都是用两个数据来描述的,分别表示这个点的行号和列号)。现在要你编程找出所有可行的道路,要求所走的路中没有重复的点,走时...

2018-04-25 21:09:01 201

原创 最大公共子串

最大公共子串Time Limit: 1000 msMemory Limit: 32768 KiBProblem Description从一个给定的串中删去(不一定连续地删去)0个或0个以上的字符,剩下地字符按原来顺序组成的串。例如:“ ”,“a”,“xb”,“aaa”,“bbb”,“xabb”,“xaaabbb”都是串“xaaabbb”的子串。(例子中的串不包含引号。) 编程求N个非空串的最长公共...

2018-04-25 21:07:52 180

原创 矩阵快速幂

先 感谢大佬的总结http://blog.csdn.net/u013795055/article/details/38599321  http://blog.csdn.net/g_congratulation/article/details/52734306https://blog.csdn.net/nyist_tc_lyq/article/details/52981353然后就没...

2018-04-23 20:51:05 126

原创 E - Simple Expression

You probably know that Alex is a very serious mathematician and he likes to solve serious problems. This is another problem from Alex.You are given three nonnegative integers a, b, c. You have to arra...

2018-04-22 00:09:37 315

原创 C1. Encryption (easy)

C1. Encryption (easy)time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRebel spy Heidi has just obtained the plans for the Death Star from the Empire...

2018-04-22 00:09:14 293

原创 H - May Day Holiday

As a university advocating self-learning and work-rest balance, Marjar University has so many days of rest, including holidays and weekends. Each weekend, which consists of Saturday and Sunday, is a r...

2018-04-22 00:09:12 340

原创 D - Beauty of Array

Edward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wants to know the summation of the beauty of all contiguous ...

2018-04-22 00:09:10 258

原创 G - Game of Nuts

The war for Westeros is still in process, manpower and supplies are coming to an end and the winter is as near as never before. The game of thrones is unpredictable so Daenerys and Stannis decided to ...

2018-04-22 00:09:07 265

原创 D - Different Sums

Alex is a very serious mathematician and he likes to solve serious problems. For example, this problem.You are to construct an array of n integers in which the amount of different integers is not less...

2018-04-22 00:09:03 240

原创 F - Elevator

The Berland State Building is the highest building in the capital of Berland. Curious Polikarp was studying the principle of operation of an elevator in the Berland State Building for a quite a while....

2018-04-22 00:09:01 187

原创 E - Kidnapping

Berland's Police has a serious problem. A foreign ambassador arrived to Berland with an important mission, and his daughter was kidnapped just from the Royal Palace! Inspired by adventures of Erast Fa...

2018-04-22 00:08:58 372

原创 B - 3D City Model

A city is built on the top of a rectangular n × m grid where all the grid cells are equal squares. Each of the n·m grid cells can serve as a foundation of a single building in the city. A building is ...

2018-04-22 00:08:56 391

原创 B1. Maximum Control (easy)

B1. Maximum Control (easy)time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Resistance is trying to take control over all planets in a particula...

2018-04-22 00:08:40 191

原创 J - Knuth-Morris-Pratt Algorithm

In computer science, the Knuth-Morris-Pratt string searching algorithm (or KMP algorithm) searches for occurrences of a "word" W within a main "text string" Sby employing the observation that when a m...

2018-04-21 23:06:38 121

原创 A - Marjar Cola

Marjar Cola is on sale now! In order to attract more customers, Edward, the boss of Marjar Company, decides to launch a promotion: If a customer returns xempty cola bottles or y cola bottle caps to th...

2018-04-21 23:05:54 179

原创 A - Minimum’s Revenge

There is a graph of n vertices which are indexed from 1 to n. For any pair of different vertices, the weight of the edge between them is the least common multiple of their indexes. Mr. Frog is wonderi...

2018-04-21 23:02:49 206

原创 L - Tic-Tac-Toe

Kim likes to play Tic-Tac-Toe.Given a current state, and now Kim is going to take his next move. Please tell Kim if he can win the game in next 2 moves if both player are clever enough.Here “next 2 mo...

2018-04-21 23:01:55 165

原创 I - People Counting

In a BG (dinner gathering) for ZJU ICPC team, the coaches wanted to count the number of people present at the BG. They did that by having the waitress take a photo for them. Everyone was in the photo ...

2018-04-21 23:00:26 287

原创 D - The Lucky Week

Edward, the headmaster of the Marjar University, is very busy every day and always forgets the date.There was one day Edward suddenly found that if Monday was the 1st, 11th or 21st day of that month, ...

2018-04-21 22:59:40 368

原创 Defuse the Bomb

The bomb is about to explode! Please defuse it as soon as possible!There is a display showing a number from 1 to 4 on the bomb. Besides this, there are 4 buttons under the display. Each button is labe...

2018-04-21 22:57:11 519

原创 Messages

B. Messagestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n incoming messages for Vasya. The i-th message is going to be received after ...

2018-04-21 22:56:01 267

原创 Splits

A. Splitstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's define a split of nn as a nonincreasing sequence of positive integers, the sum of wh...

2018-04-21 22:55:07 820

原创 Easy ProblemsetInput

Problem E. Easy ProblemsetInput file: easy.inOutput file: easy.outPerhaps one of the hardest problems of any ACM ICPC contest is to create a problemset with a reasonablenumber of easy problems. On Not...

2018-04-19 11:40:03 174

原创 Adjustment OfficeInput file

Adjustment OfficeInput file: adjustment.inOutput file: adjustment.outGarrison and Anderson are working in a company named “Adjustment Office”. In competing companiesworkers change the reality, in this...

2018-04-19 11:12:30 268

原创 传递闭包

传递闭包Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit StatisticProblem Description已知有n头牛,m次战斗关系,询问最终可以确定排名的牛的数量。Input多组测试数据,对于每组测试数据,第1行输入两个整数n(1 <= n <= 100)和m(0 <= m <= 4950),分别表示有n头牛和m次...

2018-04-19 11:08:50 1156

原创 偏序关系

偏序关系Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit StatisticProblem Description给定有限集上二元关系的关系矩阵,确定这个关系是否是偏序关系。Input多组测试数据,对于每组测试数据,第1行输入正整数n(1 <= n <= 100),第2行至第n+1行输入n行n列的关系矩阵。Output对于每组测试数据,...

2018-04-19 11:08:04 4778

原创 集合的包含

集合的包含Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit StatisticProblem Description已知含n个元素的集合的子集A和B,用位串表示法判断是否有A⊆B。Input多组测试数据,每组测试数据第1行输入正整数n(1 <= n <= 100),表示集合元素个数,第2行输入位串表示法形式的集合A,第3行输入位串表示法...

2018-04-19 11:07:24 858

原创 小P寻宝记——好基友一起走

小P寻宝记——好基友一起走Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit Statistic DiscussProblem Description话说,上次小P到伊利哇呀国旅行得到了一批宝藏。他是相当开心啊,回来就告诉了他的好基友小鑫,于是他们又结伴去伊利哇呀国寻宝。这次小P的寻宝之路可没有那么的轻松,他们走到了一个森林,小鑫一不小心被触发了机关...

2018-04-07 17:57:00 144

原创 小P寻宝记——粗心的基友

小P寻宝记——粗心的基友Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit Statistic DiscussProblem Description这对好基友他们在经历无数的艰难险阻后,终于找到了宝藏。无奈的是这一对好基友竟然是一样的粗心,又忘记了带一个大一点的包包,可惜啊、、选择又出现了啊、、已知包的体积是v,每种宝贝只有一个,宝贝的体积是pi,价...

2018-04-07 17:44:39 139

原创 小P的故事——神奇的发票报销 SDUT 2774

小P的故事——神奇的发票报销Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit Statistic DiscussProblem Description为响应党的号召,小P所在的大学现在严格规范报销制度,禁止铺张浪费。特作如下规定:允许报销的发票类型包括买图书(A类)、文具(B类)、差旅(C类),要求每张发票的总额不得超过1000元,每张发票上,单项...

2018-04-07 17:37:16 323

原创 递归的函数 SDUT 2176

递归的函数Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit StatisticProblem Description给定一个函数 f(a, b, c):如果 a ≤ 0 或 b ≤ 0 或 c ≤ 0 返回值为 1;如果 a > 20 或 b > 20 或 c > 20 返回值为 f(20, 20, 20);如果 a < b...

2018-04-05 20:42:35 626

原创 汉诺塔 SDUT 1200

汉诺塔Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit StatisticProblem Description汉诺塔(又称河内塔)问题是印度的一个古老的传说。开天辟地的神勃拉玛在一个庙里留下了三根金刚石的棒A、B和C,A上面套着n个圆的金片,最大的一个在底下,其余一个比一个小,依次叠上去,庙里的众僧不倦地把它们一个个地从A棒搬到C棒上,规定可利用...

2018-04-03 20:17:15 391

原创 全排列问题 SDUT 4165

全排列问题Time Limit: 10000 ms Memory Limit: 65536 KiBSubmit StatisticProblem Description从n个不同元素任取m(m<=n)个元素,按照一定的顺序排列起来,叫做从n个不同元素中取出m个元素的一个排列,当m=n时所有的排列情况叫全排列。现输入n个递增的数,请你输出这n个数的全排列。请按照生成排列的字典序从小到大依次输出...

2018-04-03 20:13:45 977

原创 2018 CCCC比赛总结(中石油青岛)

比赛总结2018-3-91 CCCC(青岛)计科1706 张明 2018-4-2能参加这次比赛还是很高兴的,虽然不是正式队,但是对自己打的成绩,152分,并不是很满意。     比赛之前,一直以来我都是用的c,效率很低,有些题不太好做,选拔赛后得知大佬都用c++,也改用了c++,成绩和效率确实提高很多,但不幸的是没能入选正式队,我觉得如果我早几天学会c++的话入选正式队应该问题不大,但这也算这次比...

2018-04-02 22:30:50 541

ACM国际大学生程序设计竞赛:知识与入门 俞勇

acm国际大学生程序设计竞赛(acm-icpc)是国际上公认的水平最高、规模最大、影响最深的计算机专业竞赛,目前全球参与人数达20多万。本书作者将16年的教练经验与积累撰写成本系列丛书,全面、深入而系统地将acm-icpc展现给读者。本系列丛书包括《acm国际大学生程序设计竞赛:知识与入门》、《acm国际大学生程序设计竞赛:算法与实现》、《acm国际大学生程序设计竞赛:题目与解读》、《acm国际大学生程序设计竞赛:比赛与思考》等4册,其中《acm国际大学生程序设计竞赛:知识与入门》介绍了acm-icpc的知识及其分类、进阶与角色、在线评测系统;《acm国际大学生程序设计竞赛:算法与实现》介绍了acm-icpc算法分类、实现及索引;《acm国际大学生程序设计竞赛:题目与解读》为各类算法配备经典例题及题库,并提供解题思路;《acm国际大学生程序设计竞赛:比赛与思考》介绍了上海交通大学acm-icpc的训练及比赛,包括训练札记、赛场风云、赛季纵横、冠军之路、峥嵘岁月。

2018-08-29

ACM国际大学生程序设计竞赛:算法与实现 俞勇

acm国际大学生程序设计竞赛(acm-icpc)是国际上公认的水平最高、规模最大、影响最深的计算机专业竞赛,目前全球参与人数达20多万。本书作者将16年的教练经验与积累撰写成本系列丛书,全面、深入而系统地将acm-icpc展现给读者。本系列丛书包括《acm国际大学生程序设计竞赛:知识与入门》、《acm国际大学生程序设计竞赛:算法与实现》、《acm国际大学生程序设计竞赛:题目与解读》、《acm国际大学生程序设计竞赛:比赛与思考》等4册,其中《acm国际大学生程序设计竞赛:知识与入门》介绍了acm-icpc的知识及其分类、进阶与角色、在线评测系统;《acm国际大学生程序设计竞赛:算法与实现》介绍了acm-icpc算法分类、实现及索引;《acm国际大学生程序设计竞赛:题目与解读》为各类算法配备经典例题及题库,并提供解题思路;《acm国际大学生程序设计竞赛:比赛与思考》介绍了上海交通大学acm-icpc的训练及比赛,包括训练札记、赛场风云、赛季纵横、冠军之路、峥嵘岁月。

2018-08-23

空空如也

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

TA关注的人

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