自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 枚举//可用动规写

/*Polycarp likes numbers that are divisible by 3.He has a huge number ss. Polycarp wants to cut from it the maximum number of numbers that are divisible by 33. To do this, he makes an arbitrary num...

2018-08-11 20:11:03 146

原创 动规降维

/*一个M*N矩阵中有不同的正整数,经过这个格子,就能获得相应价值的奖励,先从左上走到右下,再从右下走到左上。第1遍时只能向下和向右走,第2遍时只能向上和向左走。两次如果经过同一个格子,则该格子的奖励只计算一次,求能够获得的最大价值。 例如:3 * 3的方格。1 3 32 1 32 2 1能够获得的最大价值为:17。1 -> 3 -> 3 -> 3 -> ...

2018-08-11 20:01:55 149

原创 树直练习

/*The northern part of the Pyramid contains a very large and complicated labyrinth. The labyrinth is divided into square blocks, each of them either filled by rock, or free. There is also a little ho...

2018-08-04 20:51:07 200

原创 树的直径基础题

/*After hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has committed to create a bovine marathon for his cows to run. The marathon route will...

2018-08-04 20:47:32 484

原创 拓扑判断是否有环

/*ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many "holy cows" like HH, hh, AC, ZT, lcc, BF, Qinz and so on chat o...

2018-08-04 20:45:00 446

原创 拓扑基础题

/*有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。 Input输入有若干组,每组中的第一行为二个数N(1<=N<=500),M;其中N...

2018-08-04 20:38:53 452

原创 归并练习题

/*Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded. In the field of Cyberground, the position of each toy...

2018-08-03 20:17:15 272

原创 归并基础题

/*在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个排列的逆序数。如2 4 3 1中,2 1,4 3,4 1,3 1是逆序,逆序数是4。给出一个整数序列,求该序列的逆序数。Input第1行:N,N为序列的长度(n <= 50000) 第2 - N + 1行:序列中的元素(0 <= Aii <...

2018-08-03 20:13:24 110

原创 dfs 回溯

/*The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bo...

2018-08-01 20:33:27 414

原创 dfs练习题

/*Fox Ciel is playing a mobile puzzle game called "Two Dots". The basic levels are played on a board of size n?×?m cells, like this:Each cell contains a dot that has some color. We will use differ...

2018-08-01 20:29:37 456

原创 bfs练习题

/*Description - 题目描述[NWUACM] 你被困在一个三维的空间中,现在要寻找最短路径逃生!空间由立方体单位构成你每次向上下前后左右移动一个单位需要一分钟你不能对角线移动并且四周封闭是否存在逃出生天的可能性?如果存在,则需要多少时间?Input - 输入  输入第一行是一个数表示空间的数量。  每个空间的描述的第一行为L,R和C(皆不超过30)。  L表示...

2018-07-31 20:31:02 322

原创 bfs基础题

/*Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison. Angel's friends wan...

2018-07-31 20:27:49 383

原创 尺取求符合题意的答案

/*John has nn points on the X axis, and their coordinates are (x[i],0),(i=0,1,2,…,n?1)(x[i],0),(i=0,1,2,…,n?1). He wants to know how many pairs<a,b><a,b> that |x[b]?x[a]|≤k.(a<b)|x[b]...

2018-07-29 09:44:04 410

原创 二分求 精确度 问题

/*给你n个蛋糕的半径,你有m个朋友,所以总共有m+1个人,现在要分蛋糕,要求每个人分到的大小都是一样的,且每个人的蛋糕都是从一块上切割下来的(不能是2个不同的蛋糕拼起来的),现在问每个人最多能分到多少蛋糕(体积),保留到小数点后4位输出。Input第一行是组数T,接下来是T组数据。每组数据包含2行,第一行是n和m,均不超过10000,参考描述。第二行是n个数,每个数表示一个蛋糕的半...

2018-07-29 09:37:28 678

原创 欧法 求 逆元

/*要求(A/B)%9973,但由于A很大,我们只给出n(n=A%9973)(我们给定的A必能被B整除,且gcd(B,9973) = 1)。Input数据的第一行是一个T,表示有T组数据。 每组数据有两个数n(0 <= n < 9973)和B(1 <= B <= 10^9)。Output对应每组数据输出(A/B)%9973。Sample Input2100...

2018-07-26 19:59:38 90

原创 凸包练习题

/*Being well known for its highly innovative products, Merck would definitely be a good target for industrial espionage. To protect its brand-new research and development facility the company has ins...

2018-07-26 19:46:48 515

原创 凸包基础题

 /*Your friend to the south is interested in building fences and turning plowshares into swords. In order to help with his overseas adventure, they are forced to save money on buying fence posts by...

2018-07-26 19:45:31 420

空空如也

空空如也

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

TA关注的人

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