![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
bestcoder
mirror58229
C++ Java Python+ACM算法learning
展开
-
HDU 5776 sum
Problem DescriptionGiven a sequence, you're asked whether there exists a consecutive subsequence whose sum is divisible by m. output YES, otherwise output NOInputThe first line of th原创 2016-08-02 10:02:13 · 576 阅读 · 0 评论 -
HDU 5747 Aaronson
#include #include #include using namespace std;int main(){ int t; scanf("%d",&t); while(t--){ int n,m; scanf("%d%d",&n,&m); int sum=0; m=min(m,32); //因为n<=10^9,所以m最多只能取32 for(in原创 2016-07-24 19:21:34 · 384 阅读 · 0 评论 -
HDU 5750 Dertouzos
#include #include using namespace std;const int N=1000005;int prime[N]; void IsPrime(){ //埃式筛法打质数表 prime[0]=0;prime[1]=0;prime[2]=1; for(int i=3;i<N;i++) prime[i]=(i%2==原创 2016-07-24 19:05:08 · 357 阅读 · 0 评论 -
HDU 5718 Oracle
#include #include #include using namespace std;const int N=10000005;//数组要足够大int a[N];char s[N];int main(){ bool compare(int,int); int count0(char*); int t; scanf("%d",&t);原创 2016-07-20 13:19:14 · 398 阅读 · 0 评论 -
HDU 5778 abs
Problem DescriptionGiven a number x, ask positive integer y\geq 2y≥2, that satisfy the following conditions:The absolute value of y - x is minimalTo prime factors decomposition of Y, every原创 2016-08-02 10:08:03 · 625 阅读 · 0 评论