Favorite Donut Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5442 Description Lulu has a sweet tooth. Her favorite food is ring donut. Everyday she buys a ring donut from the same bakery. A ring donut is consis…
Problem Description 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 cave, she found a treasure chest with a com…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4759 题意:有一堆2^n的牌,牌原先按(1,2,....k)排序,每一次洗牌都将牌分成两种情况:(1,3,5,....k-1)或(2,4,6,.....k), 给出四个数:A X B Y ,问有没有可能出现A位置的牌序号为X,B位置的牌序号是Y.输出Yes或No. 1 <= N <= 1000, 1 <= A, B, X, Y <= 2^N. 分析:二进制的运用. 题目给的牌编…