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上的时间越来越少了吧...

HDU 5821 – Ball [思路/贪心]

Link http://acm.hdu.edu.cn/showproblem.php?pid=5821 Mean 给定两个长度为N的数列A和B,有M次操作,每次可以把Li到Ri段的数字打乱重排,问你能否通过M次操...
阅读全文 0

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...
阅读全文 0

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...
阅读全文 0

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...
阅读全文 0

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...
阅读全文 0

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...
阅读全文 0

HDU 1847 – Good Luck in CET-4 Everybody! [博弈/SG函数入门题]


Link http://acm.hdu.edu.cn/showproblem.php?pid=1847 Problem 大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此。当然,作为在考场浸润了十几载的当代大学生,Kiki和Cici更懂得考前的放...

HDU 1847 – Good Luck in CET-4 Everybody! [博弈/SG函数入门题]

Link http://acm.hdu.edu.cn/showproblem.php?pid=1847 Problem 大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了...
阅读全文 0

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...
阅读全文 0

CodeForces 166B – Polygons [凸包]


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

CodeForces 166B – Polygons [凸包]

Link http://codeforces.com/problemset/problem/166/B Mean 给两个多边形,保证第一个为凸多边形。多边形三点不共线。问你第二个多边形是否在第一个多边形内...
阅读全文 0

第七届山东省ACM程序设计竞赛 赛后总结


这次省赛用一句话概括,就是开场顺利,后面比较累略懵逼。 整体来讲跟平时训练的多少和难度是很有关系的,最后的D和H,一个考察思路, 一个考察代码能力。可惜的是H题懵逼状态谢了一个小时写完没有过还剩5分钟也没时间修改。D题其实真的很简单但是我们三个人都没想...

第七届山东省ACM程序设计竞赛 赛后总结

这次省赛用一句话概括,就是开场顺利,后面比较累略懵逼。 整体来讲跟平时训练的多少和难度是很有关系的,最后的D和H,一个考察思路, 一个考察代码能力。可...
阅读全文 0