HDu--我要拿走你的蜡烛】的更多相关文章

我要拿走你的蜡烛 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0 Problem Description Darkrai最近喜欢玩<炉石传说>,他在一局比赛中使用了吉安娜英雄,选择了冰法套牌.炉石传说游戏的目的是使对方英雄的生命值降低到0点及0点以下,谁先做到谁就获得胜利.炉…
杭州电子科技大学程序设计竞赛 2016‘12-网络同步赛 前几天看到这个比赛,想着要是到时候没事就做一下,但是中午实在太困,加上水平太次,才a了4道题目. 说明:我是看ac人数多少的顺序来做题的. 1.1001 BigZhuGod的粉丝 没写输入与输出,看例子,找规律!注意一行字符输入的方法.我一般是用getline(cin, s),但是一般会得到'\n',可能需要先getchar()处理一下. 2. 1007 反差萌 看题意,输入2*n个数,然后排序,求和就完了!我刚开始一直无法ac,才发现,…
5795 || 3032 把x个石子的堆分成非空两(i, j)或三堆(i, j, k)的操作->(sg[i] ^ sg[j])或(sg[i] ^ sg[j] ^ sg[k])是x的后继 #define pron "hdu5795" #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; ; ]…
Triangle 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5914 Description Mr. Frog has n sticks, whose lengths are 1,2, 3⋯n respectively. Wallice is a bad man, so he does not want Mr. Frog to form a triangle with three of the sticks here. He decides…
http://acm.hdu.edu.cn/showproblem.php?pid=5795 A Simple Nim Problem Description   Two players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn they can pick any number of candies which come from…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4430 题目大意:给定n个蜡烛,围绕蛋糕的中心插同心圆,从里往外分别是第1圈.第2圈....第r圈,第 i 圈要插k^i 个蜡烛,且r*k最小.求出r和k.注意,中心点可以放,也可以不放 Sample Input 18 111 1111   Sample Output 1 17 2 10 3 10 代码如下: # include<cstdio> # include<cstring> #…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4422 题目大意:小姑娘背着5个包去山上采蘑菇,每座山上只能用一个背包采集.三个小精灵会要她3个背包,其里面蘑菇的数量必须是1024的倍数,否则5个背包都会被拿走.然后魔术师会从她剩下的背包里取走蘑菇,每次取1024克,直到蘑菇不超过1024克为止.求小姑娘最多能得到多少蘑菇. Sample Input 1 9 4 512 512 512 512 5 100 200 300 400 500 5 208…
题意: 给出n个地雷所在位置,正好能够组成正方形的地雷就可以拿走..为了简化题目,只考虑平行于横轴的正方形.. 问最多可以拿走多少个正方形.. 思路: 先找出可以组成正方形的地雷组合cnt个.. 然后st = 1<<cnt.. 用位运算来考虑取哪一个组合可以拿走最多的地雷且满足题目条件.. Tips: 题目比较烦恼的地方是解决: ①. 所选集合里面的地雷会不会重复拿.. ②. 所选集合里面在同一个地方取走的地雷会不会比该地方题目给出的地雷数多.. 同一个地点可能有多个地雷,如果用去重就不好算多…
主题链接: HDU:pid=4430" target="_blank">http://acm.hdu.edu.cn/showproblem.php?pid=4430 ZJU:problemId=4888" target="_blank">http://acm.zju.edu.cn/onlinejudge/showProblem.do? problemId=4888 Problem Description Today is Yukari…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1907 Problem Description Little John is playing very funny game with his younger brother. There is one big box filled with M&Ms of different colors. At first John has to eat several M&Ms of the same c…