摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5104找元组数量,满足p1#include #include #include #include #include #include #include #include #include using namespa...
阅读全文
随笔分类 - 水题
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5099比较两个安卓手机型号,水题注意点:A is actually implicit and usually omitted for brevity.输入字符长度可能为5,这时候individual version...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5090给一段长度为n数列,问能否给任意个数加上k的倍数,使得加完之后恰好只有1~n贪心,先排序,依次加出1~n,每次看能否从给定数列中找到一个未被标记的数使得其能加到当前的i,能则标记,最后能完成即输出Jerry#...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5086求一段数列里面所有连续和的和,卡精度规律很明显,数列里面每个数都被加了i*(n+1-i)次注意下精度即可#include #include #include #include #include #includ...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5082字符串水题#pragma comment(linker, "/STACK:36777216")#pragma GCC optimize ("O2")#include #include #include #in...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5078时间排序,找距离/时间差最大点#include #include #include #include #include #include #include #include #include using na...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4891给出一个文本,问说有多少种理解方式。1. $$中间的,(s1+1) * (s2+1) * ...*(sn+1), si表示连续的空格数。2.{}中间,即 | 的个数+1.就是模拟#include #inclu...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4925给定一个N*M的网格,对于每个格子可以选择种树和施肥,默认一个苹果树收获1个苹果,在一个位置施肥的话,周围四个格子如果有种树,那么产量加倍。为最大产量。黑白格方法最优,模拟即可#include #includ...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5066中学物理题#include #include #include #include #include #include #include #include #include using namespace st...
阅读全文
摘要:#include #include #include #include #include using namespace std;int a,b;int main(){ while(scanf("%d%d",&a,&b) != EOF) { printf("%d\n",(a...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2544直接搞存份模板http://blog.csdn.net/niushuai666/article/details/7292722#include #include #include #include #incl...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4950给定怪兽血量h,你攻击力a,怪物回血力b,你攻击k次要休息一次,问能否杀死怪兽特判一次打死怪兽的情况和第k次前打死怪兽的情况,否则只要能磨死怪兽即可#include #include #include #in...
阅读全文
摘要:中位数是否大于平均数水题#include #include #include #include #include #include #include #include #include using namespace std;#define RD(x) scanf("%d",&x)#define R...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4993满足ax + by = c的x,y对数水题,暴力#include #include #include #include #include #include #include #include #include...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5063只有50个询问,50个操作逆推回去即可,注意mul每次要*2%(modo - 1)因为是指数!#include #include #include #include #include #include #in...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5062模拟筛出对称单峰数(12321)的个数,水题#include #include #include #include #include #include #include #include #include u...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=4956首先给出一个范围 [l, r],问能否从中找到一个数证明Hanamichi’s solution 的解法(对于某个数 X,偶数位的数字之和 - 奇数位的数字之和 = 3 而且 这个 X 满足 X mod 11...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5003记得排序后输出#include #include #include #include #include #include #include #include #include using namespace ...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5007字符串处理暴力#include #include #include #include #include #include #include #include #include using namespace ...
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=5018任意给你三个数,让你判断第三个数是否在以前两个数为开头组成的Fibonacci 数列中。直接暴力#include #include #include #include #include #include #i...
阅读全文