摘要: 题目链接:hdu_5776_sum 题意: 给你一串数,问你是否有一个连续的子序列的和为m的倍数 题解: 维护一个前缀和%m的值,如果前缀和%m的值为0或者有两个前缀和%m的值相同,那么就有一个连续区间的和为m的倍数 1 #include<bits/stdc++.h> 2 #define F(i,a 阅读全文
posted @ 2016-07-30 23:10 bin_gege 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 题目链接:hdu_5777_domino 题意: 1 #include<bits/stdc++.h> 2 using namespace std; 3 4 const int N=1e5+7; 5 int a[N],t,n,k; 6 int main(){ 7 scanf("%d",&t); 8 w 阅读全文
posted @ 2016-07-30 22:55 bin_gege 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目链接:hdu_5768_Lucky7 题意: 给你一个区间,问你这个区间内是7的倍数,并且满足%a[i]不等于w[i]的数的个数 乍一看以为是数位DP,仔细看看条件,发现要用中国剩余定理,然后容斥一下就出答案了,不过这里在中国剩余定理里面的乘法会有数据爆long long ,所有要写一个高精度乘 阅读全文
posted @ 2016-07-30 16:12 bin_gege 阅读(156) 评论(0) 推荐(0) 编辑
摘要: D. Road to Post Office time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. Road to Post Of 阅读全文
posted @ 2016-07-30 01:41 bin_gege 阅读(156) 评论(0) 推荐(0) 编辑
摘要: B. Powers of Two time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output B. Powers of Two time l 阅读全文
posted @ 2016-07-30 01:35 bin_gege 阅读(290) 评论(0) 推荐(0) 编辑
摘要: C. Cellular Network time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given n poin 阅读全文
posted @ 2016-07-30 01:17 bin_gege 阅读(157) 评论(0) 推荐(0) 编辑