原创 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

原创 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,

原创 LightOJ - 1117 Helping Cicada (容斥+狀態壓縮)

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

原创 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 b

原创 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 nu

原创 HDU-2017 多校訓練賽1(賽上+補題)

1001-Add More Zero 題意:求2^m -1 =>10^k 已知m 求最大的k 思路: 賽上沒有多想就開始找規律。。然後浪費了一些時間還wa了,最後改過了。 後來看題解 發現就是個簡單的公式,一行代碼嗚嗚嗚嗚 10^k

原创 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).

原创 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

原创 lightOJ Discovering Gold(期望DP入門)

期望DP理解:http://kicd.blog.163.com/blog/static/126961911200910168335852/ kuangbin期望DP練習題: http://www.cnblogs.com/kuangbin

原创 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 findin

原创 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 t

原创 UVA101The Blocks Problem(小模擬+STL)

B - The Blocks Problem Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Descript

原创 CQU TaoSama與煎餅 (dp)

題意: 有n個點 每個點有不同的美味度, 現在給你一些道具 可以跳1格2格3格4格 保證所有道具全部用完可以飛到第n個臺子 問你能收穫的最大美味度 分析: 狀態定義f[i][j][k][p] 表示+1+2+3+4種道具各用了多少

原创 Codeforces 449 B. Jzzhu and Cities(圖論dijk)

B. Jzzhu and Cities time limit per test 2 seconds memory limit per test 256 megabytes input standard input output st

原创 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 conve