LightOJ - 1032 Fast Bit Calculations(数位DP/ 递推)

A bit is a binary digit, taking a logical value of either 1 or 0 (also referred to as “true” or “false” respectively). And every decimal number has a...

2017-08-21 13:39:52

阅读数 192

评论数 0

LightOJ - 1021 Painful Bases(状压DP)

As you know that sometimes base conversion is a painful task. But still there are interesting facts in bases.For convenience let’s assume that we are...

2017-08-14 16:04:14

阅读数 119

评论数 0

LightOJ 1018 Brush (IV)(状态压缩DP)

Mubashwir returned home from the contest and got angry after seeing his room dusty. Who likes to see a dusty room after a brain storming programming ...

2017-08-14 13:42:06

阅读数 107

评论数 0

HDU - 5036 Explosion(期望+bitset)【存疑】

Soda has a bipartite graph with nn vertices and mm undirected edges. Now he wants to make the graph become a complete bipartite graph with most edges...

2017-08-09 16:56:08

阅读数 187

评论数 0

Light OJ -1161 Extreme GCD (容斥)

All of you know that GCD means the greatest common divisor. So, you must have thought that this problem requires finding some sort of GCD. Don’t worr...

2017-08-07 13:46:40

阅读数 287

评论数 0

LightOJ - 1117 Helping Cicada (容斥+状态压缩)

Cicada is an insect with large transparent eyes and well-veined wings similar to the “jar flies”. The insects are thought to have evolved 1.8 million...

2017-08-05 19:39:30

阅读数 153

评论数 0

HDU - 6047 多校2 1003 Maximum Sequence (贪心+优先队列)

Steph is extremely obsessed with “sequence problems” that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the next number? ...

2017-07-28 11:06:26

阅读数 135

评论数 0

HDU6035 Colorful Tree(dfs继承思想,虚树怎么写??)

There is a tree with nn nodes, each of which has a type of color represented by an integer, where the color of node ii is cici. The path between each...

2017-07-26 16:48:35

阅读数 227

评论数 0

HDU-2017 多校训练赛1(赛上+补题)

1001-Add More Zero题意:求2^m -1 =>10^k 已知m 求最大的k思路:赛上没有多想就开始找规律。。然后浪费了一些时间还wa了,最后改过了。 后来看题解 发现就是个简单的公式,一行代码呜呜呜呜 10^k<=2^m -1 log(10)10^k<= ...

2017-07-25 18:36:46

阅读数 522

评论数 0

CQU TaoSama与煎饼 (dp)

题意: 有n个点 每个点有不同的美味度, 现在给你一些道具 可以跳1格2格3格4格 保证所有道具全部用完可以飞到第n个台子 问你能收获的最大美味度分析: 状态定义f[i][j][k][p] 表示+1+2+3+4种道具各用了多少个 那么当前位置pos=i+j*2+k*3+p*4+1;注意...

2017-06-03 22:17:11

阅读数 162

评论数 0

HackerRank - lucky-numbers(数位DP)

A number is called lucky if the sum of its digits, as well as the sum of the squares of its digits is a prime number. How many numbers between A and ...

2017-05-06 16:09:14

阅读数 248

评论数 0

HDU5011 Game(Nim博弈)

Game Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 437 Accepted Submission(s): 340Pro...

2017-05-06 16:01:34

阅读数 201

评论数 0

HDU - 4027Can you answer these queries? (bit+并查集)

A lot of battleships of evil are arranged in a line before the battle. Our commander decides to use our secret weapon to eliminate the battleships. E...

2017-04-22 00:30:40

阅读数 132

评论数 0

Codeforces 449 B. Jzzhu and Cities(图论dijk)

B. Jzzhu and Citiestime limit per test2 secondsmemory limit per test256 megabytesinput standard input output standard output Jzzhu is the preside...

2017-01-19 15:18:53

阅读数 224

评论数 0

惠民工程(最小生成树裸题)

惠民工程 Time Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu SubmitStatus Description 市政府“惠民工程”的目标是在全市n个居民点间之架设煤气管道(但不一定有...

2016-10-27 23:30:21

阅读数 360

评论数 0

lightOJ Discovering Gold(期望DP入门)

期望DP理解:http://kicd.blog.163.com/blog/static/126961911200910168335852/kuangbin期望DP练习题: http://www.cnblogs.com/kuangbin/archive/2012/10/02/2710606.htm...

2016-08-04 13:31:22

阅读数 270

评论数 0

POJ 2229 Sumsets(dp 递推)

Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an integer powe...

2016-08-02 20:32:54

阅读数 179

评论数 0

UVA101The Blocks Problem(小模拟+STL)

B - The Blocks Problem Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu SubmitStatus Description Download as PDF Backg...

2016-07-20 20:49:39

阅读数 1305

评论数 0

POJ2376Cleaning Shifts(贪心)

Farmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow work...

2016-07-19 14:58:32

阅读数 389

评论数 0

UVA1589xiangqi(模拟)

题目:给你一盘红方已经对黑方“将军”的局,黑方只剩下将,红方还有很多棋子。下一步该黑方走,问红方是否将黑方将死。 debug了一天wa了9发= =非常吐血,其实很多人1A了 我却wa了9发 总的来说模拟的思路: 现将棋盘读入,然后将每一个红方棋子能够吃到的位置都标记起来,最后判断黑方将能去的...

2016-07-18 21:09:52

阅读数 350

评论数 1

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