### HDU 5821 – Ball [思路/贪心]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5821 Mean 给定两个长度为N的数列A和B，有M次操作，每次可以把Li到Ri段的数字打乱重排，问你能否通过M次操作把A变成B Analysis 多校场上想了好久没想出来，思路越来越不行了，可能是最近花在ACM上的时间越来越少了吧...

### CodeForces 589K – Task processing [暴力/数学/优先队列]

Link http://codeforces.com/problemset/problem/589/K Problem Vasya wants to create a computing system to process arbitrary tasks. As a part of the system he needs an algorithm which will choose an order of task execution. He came up with the follow...

#### CodeForces 589K – Task processing [暴力/数学/优先队列]

Link http://codeforces.com/problemset/problem/589/K Problem Vasya wants to create a computing system to process arbitrary tasks. As a part of the s...

### HDU 5818 – Joint Stacks [左偏树/优先队列]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5818 Problem A stack is a data structure in which all insertions and deletions of entries are made at one end, called the “top” of the stack. The last entry which is inserted is the first ...

#### HDU 5818 – Joint Stacks [左偏树/优先队列]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5818 Problem A stack is a data structure in which all insertions and deletions of entries are made a...

### HDU 3234 – Exclusive-OR [带权并查集+XOR性质]

Link http://acm.hdu.edu.cn/showproblem.php?pid=3234 Problem You are not given n non-negative integers X0, X1, …, Xn-1 less than 2 20 , but they do exist, and their values never change. I’ll gradually provide you some facts about them, ...

#### HDU 3234 – Exclusive-OR [带权并查集+XOR性质]

Link http://acm.hdu.edu.cn/showproblem.php?pid=3234 Problem You are not given n non-negative integers X0, X1, …, Xn-1 less than 2 20 , but th...

### HDU 5446 – Unknown Treasure [Lucas定理+中国剩余定理+快速乘法]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5446 Problem On the way to the next secret treasure hiding place, the mathematician discovered a cave unknown to the map. The mathematician entered the cave because it is there. Somewhere deep in the ...

#### HDU 5446 – Unknown Treasure [Lucas定理+中国剩余定理+快速乘法]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5446 Problem On the way to the next secret treasure hiding place, the mathematician discovered a cav...

### HDU 5724 – Chess [SG函数+状压]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5724 Problem Alice and Bob are playing a special chess game on an n × 20 chessboard. There are several chesses on the chessboard. They can move one chess in one turn. If there are no other chesses on ...

#### HDU 5724 – Chess [SG函数+状压]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5724 Problem Alice and Bob are playing a special chess game on an n × 20 chessboard. There are sever...

### HDU 5723 – Abandoned country [Kruskal+DFS]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5723 Problem An abandoned country has n(n≤100000) villages which are numbered from 1 to n. Since abandoned for a long time, the roads need to be re-built. There are m(m≤1000000) roads to be re-built, ...

#### HDU 5723 – Abandoned country [Kruskal+DFS]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5723 Problem An abandoned country has n(n≤100000) villages which are numbered from 1 to n. Since aba...

### CodeForces 166B – Polygons [凸包]

Link http://codeforces.com/problemset/problem/166/B Mean 给两个多边形，保证第一个为凸多边形。多边形三点不共线。问你第二个多边形是否在第一个多边形内部，也即所有点都在第一个多边形内部。 Analysis 求第一个多边形的凸包和两个多边形公共凸包，判断两个凸包...