自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU - 3709 : Balanced Number (数位dp)

题目链接 : HDU-3709A balanced number is a non-negative integer that can be balanced if a pivot is placed at some digit. More specifically, imagine each digit as a box with weight indicated by the di

2017-10-31 23:05:01 297

原创 POJ - 3252 : Round Numbers (数位dp)

题目链接 : POJ-3252The cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as 'Rock, Paper, Scissors', 'Ro, Sham, Bo', and a host of other

2017-10-31 22:58:09 215

原创 HDU - 3652 : B-number (数位dp)

题目链接 : 杭电3652A wqb-number, or B-number for short, is a non-negative integer whose decimal form contains the sub- string "13" and can be divided by 13. For example, 130 and 2613 are wqb-numbers,

2017-10-31 22:51:37 240

原创 codeforces839C Journey(DFS)

点击打开链接C. Journeytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n cities and n - 1 roads

2017-08-16 19:31:48 236

原创 CodeForces - 734D Anton and Chess (思维题)

点击打开链接Anton likes to play chess. Also, he likes to do programming. That is why he decided to write the program that plays chess. However, he finds the game on 8 to 8 board to too simple, he uses

2017-08-16 19:17:24 260

原创 CodeForces - 734E Anton and Tree(树的直径)

点击打开链接Anton is growing a tree in his garden. In case you forgot, the tree is a connected acyclic undirected graph.There are n vertices in the tree, each of them is painted black or white. Anto

2017-08-16 19:08:16 228

原创 FZU - 2267(后缀数组)

点击打开链接Fat brother and Maze are playing a kind of special (hentai) game with two integers. All the digits of these two integers are in the range from 1 to 9. After they’ve got these two integer

2017-08-10 15:04:37 485

原创 FZU - 2271(最短路变形)

点击打开链接X is a fully prosperous country, especially known for its complicated transportation networks. But recently, for the sake of better controlling by the government, the president Fat Bro

2017-08-10 14:54:29 337

原创 Anniversary party HDU - 1520(树形dp)

传送门There is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the supervisor relation f

2017-08-08 22:50:41 204

原创 TELE POJ - 1155 (树形dp)

传送门A TV-network plans to broadcast an important football match. Their network of transmitters and users can be represented as a tree. The root of the tree is a transmitter that emits the footbal

2017-08-08 22:37:10 249

原创 The more, The Better HDU - 1561(树形dp)

传送门ACboy很喜欢玩一种战略游戏,在一个地图上,有N座城堡,每座城堡都有一定的宝物,在每次游戏中ACboy允许攻克M个城堡并获得里面的宝物。但由于地理位置原因,有些城堡不能直接攻克,要攻克这些城堡必须先攻克其他某一个特定的城堡。你能帮ACboy算出要获得尽量多的宝物应该攻克哪M个城堡吗? Input每个测试实例首先包括2个整数,N,M.(1 = 0。当N = 0, M

2017-08-08 22:28:04 177

原创 hihocoder第九十六周 数论五·欧拉函数

点击打开链接#1298 : 数论五·欧拉函数时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho有时候会用密码写信来互相联系,他们用了一个很大的数当做密钥。小Hi和小Ho约定了一个区间[L,R],每次小Hi和小Ho会选择其中的一个数作为密钥。小Hi:小Ho,这次我们选[L,R]中的一

2017-08-03 09:45:52 227

原创 hihocoder第九十四周 数论三·约瑟夫问题

点击打开链接#1296 : 数论三·约瑟夫问题时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho的班级正在进行班长的选举,他们决定通过一种特殊的方式来选择班长。首先N个候选人围成一个圈,依次编号为0..N-1。然后随机抽选一个数K,并0号候选人开始按从1到K的顺序依次报数,N-1号

2017-08-03 09:40:44 271

原创 hihocoder第九十三周 数论二·Eular质数筛法

传送门#1295 : 数论二·Eular质数筛法时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Ho:小Hi,上次我学会了如何检测一个数是否是质数。于是我又有了一个新的问题,我如何去快速得求解[1,N]这个区间内素数的个数呢?小Hi:你自己有什么想法么?小Ho:有!我一开始的想法是,自然

2017-08-03 09:34:03 254

原创 hihocoder第72周 数论一·Miller-Rabin质数测试(Miller-Rabin质数测试)

传送门#1287 : 数论一·Miller-Rabin质数测试时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Hi和小Ho最近突然对密码学产生了兴趣,其中有个叫RSA的公钥密码算法。RSA算法的计算过程中,需要找一些很大的质数。小Ho:要如何来找出足够大的质数呢?小Hi:我倒是有一个想法

2017-08-03 09:14:02 207

原创 codeforces Star sky(二维前缀和)

传送门C. Star skytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Cartesian coordinate system is set

2017-08-01 16:01:59 549

原创 HDU - 1069 Monkey and Banana (dp)

传送门A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If

2017-07-30 22:03:27 239

原创 Find MaxXorSum NBUT - 1597(字典树)

点击打开链接Given n non-negative integers, you need to find two integers a and b that a xor b is maximum. xor is exclusive-or.InputInput starts with an integer T(T For each test case, the first line

2017-07-28 21:58:46 261

原创 HDU - 1251 统计难题 (字典树)

点击打开链接Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表的是老师交给Ignatius统计的单词,一个空行代表单词表的结束.第二部分是一连串的提问,每行一个提问,每

2017-07-28 21:51:45 215

原创 String painter hdu2476(区间dp)

点击打开链接String painterTime Limit: 5000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4451    Accepted Submission(s): 2079Problem Description

2017-07-28 21:15:01 253

原创 HDU - 3516 Tree Construction(区间dp)

传送门Consider a two-dimensional space with a set of points (xi, yi) that satisfy xi yj for all i < j. We want to have them all connected by a directed tree whose edges go toward either right (x p

2017-07-28 20:57:41 432

原创 ZOJ - 3469 Food Delivery (区间dp)

传送门When we are focusing on solving problems, we usually prefer to stay in front of computers rather than go out for lunch. At this time, we may call for food delivery.Suppose there are N peopl

2017-07-28 20:38:27 269

原创 HDU - 5115 Dire Wolf(区间dp)

传送门Dire wolves, also known as Dark wolves, are extraordinarily large and powerful wolves. Many, if not all, Dire Wolves appear to originate from Draenor. Dire wolves look like normal wolves, b

2017-07-28 20:20:01 298

原创 ZOJ - 3537 Cake(凸包+区间dp)

传送门You want to hold a party. Here's a polygon-shaped cake on the table. You'd like to cut the cake into several triangle-shaped parts for the invited comers. You have a knife to cut. The trace o

2017-07-28 20:10:38 407

原创 hdu2955 Robberies(01背包)题解

传送门The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become too greedy. He has decided to work in th

2017-07-26 19:15:38 375

原创 hdu3605 Escape题解

传送门2012 If this is the end of the world how to do? I do not know how. But now scientists have found that some stars, who can live, but some people do not fit to live some of the planet. Now sc

2017-07-22 21:28:33 269

原创 poj1459 Power Network题解

传送门A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an am

2017-07-22 21:09:09 242

原创 poj3281 Dining 题解

传送门Cows are such finicky eaters. Each cow has a preference for certain foods and drinks, and she will consume no others.Farmer John has cooked fabulous meals for his cows, but he forgot to

2017-07-22 20:45:35 284 1

原创 hdu1532 Drainage Ditches

传送门Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow.

2017-07-22 20:40:43 232

原创 CodeForces - 719E Sasha and Array

传送门E. Sasha and Arraytime limit per test5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSasha has an array of integer

2017-07-20 14:53:16 277

原创 Conscription POJ - 3723

传送门Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wants to collect them to be his soldiers. To collect a soldier without a

2017-07-13 21:18:26 253

原创 CodeForces - 719B Anatoly and Cockroaches

Anatoly lives in the university dorm as many other students do. As you know, cockroaches are also living there together with students. Cockroaches might be of two colors: black and red. There are n co

2017-07-13 21:04:15 327

原创 LightOJ - 1132 Summing up Powers

Given N and K, you have to find(1K + 2K + 3K + ... + NK) % 232InputInput starts with an integer T (≤ 200), denoting the number of test cases.Each case contains two integers N (1 ≤ N ≤ 1015) an

2017-07-13 20:40:42 303

原创 CodeForces - 580B Shell Game

题目网址: http://codeforces.com/problemset/problem/777/AKefa and Company Kefa wants to celebrate his first big salary by going to restaurant. However, he needs company.Kefa has n friends

2017-05-16 20:06:22 347

原创 Shell Game CodeForces - 777A

Bomboslav likes to look out of the window in his room and watch lads outside playing famous shell game. The game is played by two persons: operator and player. Operator takes three similar opaque shel

2017-05-16 19:59:47 303

原创 Magic Spheres

Carl is a beginner magician. He has a blue,b violet and c orange magic spheres. In one move he can transform two spheresof the same color into one sphere of any other color. To make a spell that h

2017-01-17 11:04:16 258

空空如也

空空如也

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

TA关注的人

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