Dragons】的更多相关文章

http://codeforces.com/problemset/problem/230/A Dragons time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Kirito is stuck on a level of the MMORPG he is playing now. To move on in the game, h…
E. Mother of Dragons time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output There are n castles in the Lannister's Kingdom and some walls connect two castles, no two castles are connected by more…
[CF839E]Mother of Dragons 题意:给你一张n个点,m条边的无向图.你有k点能量,你可以把能量分配到任意一些点上,每个点分到的能量可以是一个非负实数.定义总能量为:对于所有边<a,b>,a的能量*b的能量 的和.让你最大化总能量. $n\le 40,k\le 1000$ 题解:容易发现,最后的分配方案一定是给一个大小为cnt的完全子图中的每个点都分配$k\over cnt$点能量. 那么本题就变成了一般图最大团问题,可以用随机化搞定,这里给出一种meet in the m…
Komodo dragons live on a handful of islands in Indonesia, but their reputation has spread far and wide. Reaching lengths of up to 10 feet, the razor-toothed monitor lizards hunt deer in packs and have even attacked humans on occasion. But actually, t…
B. No Time for Dragons time limit per test 2.0 s memory limit per test 256 MB input standard input output standard output One fairy king hated dragons to death. Not only that these monsters burn whole villages to ashes, kidnap princesses and guard tr…
3487. [NOIP2013模拟联考11]剑与魔法(dragons) (Standard IO) Time Limits: 1000 ms  Memory Limits: 131072 KB  Detailed Limits   Goto ProblemSet Description 万老师听说某大国很流行穿越,于是他就想写一个关于穿越的剧本. 闲话休提.话说老师穿越到了某一个剑与魔法的大陆.因为如此这般,所以老师从维娜艾那里得到了预言.老师一共被告知了若干件按顺序结算的事件.这些事件分为两类…
Kirito is stuck on a level of the MMORPG he is playing now. To move on in the game, he's got to defeat all n dragons that live on this level. Kirito and the dragons have strength, which is represented by an integer. In the duel between two opponents…
题目链接:http://acm.sgu.ru/problem.php?contest=0&problem=548 题目意思: 有一个骑士,要经过n个房间,开始在第一个房间,每个房间里面有龙或者公主,遇到龙,可以决定杀或者不杀,如果杀,就可以得到相应的珠宝:如果遇到公主,如果这个骑士此时杀过的龙的数目大于等于公主的美貌值,那么这个骑士必须marry这个公主,不能拒绝..^_^,但是骑士的真爱是在最后一个房间里面的公主,问骑士能不能到达最后一个房间?如果能的话,求出能够到达最后一个房间的情况下,得到…
意甲冠军: n个月格儿  所有的格龙或公主的儿子  从勇士1走n  不杀  杀死有钱拿  路过公主  假设之前杀龙的数量满足公主要求就会停止行走  问  勇士想多拿钱  可是必需要满足n格子的公主  最多拿多少钱 思路: 公主仅仅限制杀龙的数量  因此不想停下来结婚就控制杀龙的数量就可以  假设要放弃一些龙  那么一定会贪心放弃钱少的龙  最后推断一下能不能和n格子的公主结婚就可以 代码: #include<cstdio> #include<iostream> #include&l…
The Triwizard Tournament's third task is to negotiate a corridor of many segments, and reach the other end. The corridor is N segments long. The ith segment is either empty or has a dragon. Harry cannot pass the dragon and will have no option but to…