随笔分类 - 搜索
摘要:time limit per test2 seconds memory limit per test512 megabytes inputstandard input outputstandard output Recently in school Alina has learned...
阅读全文
摘要:描述 B国在耗资百亿元之后终于研究出了新式武器——连环阵(Zenith Protected Linked Hybrid Zone)。传说中,连环阵是一种永不停滞的自发性智能武器。但经过A国间谍的侦察发现,连环阵其实是由M个编号为1,2,…,M的独立武器组成的。最初,1号武器发挥着攻击...
阅读全文
摘要:描述 Flappy Bird 是一款风靡一时的休闲手机游戏。玩家需要不断控制点击手机屏幕的频率来调节小鸟的飞行高度,让小鸟顺利通过画面右方的管道缝隙。如果小鸟一不小心撞到了水管或者掉在地上的话,便宣告失败。 图片 为了简化问题,我们对游戏规则进行了简化和改编: 游戏界面是一个长为 n...
阅读全文
摘要:time limit per test4 seconds memory limit per test512 megabytes inputstandard input outputstandard output The farmer Polycarp has a warehouse ...
阅读全文
摘要:time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Theseus has just arrived to Crete to...
阅读全文
摘要:time limit per test1.5 seconds memory limit per test256 megabytes inputstandard input outputstandard output Vanya is in the palace that can be...
阅读全文
摘要:Time Limit: 1 second Memory Limit: 50 MB【问题描述】所谓虫食算,就是原先的算式中有一部分被虫子啃掉了,需要我们根据剩下的数字来判定被啃掉的字母。来看一个简单的例子: 43#9865#045 + 8468#6633 44445506978 其中#...
阅读全文
摘要:【题目链接】:http://www.lydsy.com/JudgeOnline/problem.php?id=1016【题意】 【题解】 /* 两个最小生成树T和T'; 它们各个边权的边的数目肯定是一样的; 且相同边权的边; 那些边所形成的联通性是一样的; ...
阅读全文
摘要:【题目链接】:http://codeforces.com/contest/779/problem/B【题意】 问你要删掉几个数字才能让原来的数字能够被10^k整除; 【题解】 /* 数字的长度不大; 让你删掉最小的数字个数 使得这个数字能被10^k整除; 搜...
阅读全文
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Ilya is an experienced player in tic...
阅读全文
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given a non-negative integer...
阅读全文
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You have n problems. You have estima...
阅读全文
摘要:time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output On the way to Rio de Janeiro Ostap k...
阅读全文
摘要:Time Limit: 1 second Memory Limit: 50 MB 【问题背景】 近来,一种新的传染病肆虐全球。蓬莱国也发现了零星感染者,为防止该病在蓬莱国 大范围流行,该国政府决定不惜一切代价控制传染病的蔓延。不幸的是,由于人们尚未完 全认识这种传染病,难以准确判别病毒携带者,更没有
阅读全文
摘要:【Link】:http://acm.hdu.edu.cn/showproblem.php?pid=6140【Description】 等价于告诉你有n个物品,每个物品的价值为-a[i]或a[i],或者这个物品可以看成两个物品一个为a[i]另外一个为-a[i]; 问你能不能达到物品价...
阅读全文
摘要:【Link】:【Description】 给你最多n个棍子; (nsum 最后的长度x肯定是sum的因子; 则枚举x从各根棍子长度的最大值到sum作为因子; 枚举量假设为len; 然后一直用剩余的棍子去凑这个长度len 凑够了,就重新选择剩下的棍子,继续凑len; 剪枝: 1.还需...
阅读全文
摘要:Problem StatementYou are given a vector t that describes a rectangular table of zeroes and ones. Each character in t is either ‘0’ or ‘1’. We...
阅读全文
摘要:【题目链接】:http://codeforces.com/contest/799/problem/D【题意】 给你长方形的两条边h,w; 你每次可以从n个数字中选出一个数字x; 然后把h或w乘上x; 直到能够把一个长为a宽为b的长方形装下为止; 问你最小的数字选择次数; 【题解】 ...
阅读全文
摘要:【题目链接】:http://hihocoder.com/problemset/problem/1317【题意】 【题解】 dfs就能过吧. 在选取的时候; 把选取的这一行,占据的列,列的权值+1; 按列搜; 在搜第col列的时候,前i-1列保证有且只有一个行占据着 如果选择的某一行...
阅读全文
摘要:【题目链接】:http://hihocoder.com/problemset/problem/1312?sid=1092363【题意】 【题解】 定义一个A*函数 f = step+val 这里的val是当前这个状态;每个点到目标状态的点的曼哈顿距离的绝对值; (这个值肯定比真正需...
阅读全文

浙公网安备 33010602011771号