2020年Acm暑期考核Hznu _2797】的更多相关文章

题目链接:http://acm.hznu.edu.cn/OJ/problem.php?id=2797 题意:求1-N中有多少数字满足: x是正整数且无前导0. x(mod 666) = S(x). 6在x这个数的各数位上出现的总次数必须为奇数. 题解:数位dp模板题(当时考核的时候忘记了板子当场去世) Ac代码: 1 #include<iostream> 2 #include<algorithm> 3 #include<vector> 4 #include<cst…
ACM暑期集训总结报告 不知不觉,ACM暑期集训已经过去了一个月了(其实我还差几天才够一个月,因为最后几天要回家办助学贷款,所以没坚持到最后,当了个逃兵.....[汗])也到了结束的时候.在这一个月中, 有压力,有感触,也有喜悦.收获了很多,反思了很多. 知识方面,这一个月中, 主要是看了DP的内容,包括基础DP(主要是背包), 状压DP, 数位DP(掌握的不好), 树形DP.另外,每周有几场训练赛,通过训练赛的题目,既重温了已经有些模糊的一些知识点,学习到了新的知识点.最后,还参加了一场CCP…
简直智障,上一题V题,样例输出里面的“Case:”不要输出,到了这题又是要输出的了 #include<iostream> using namespace std; int num[100000]; int main() { int T; for(int i=32;i<100;i++){ num[i*i]=1; } cin>>T; int n; int k=0; while(T--){ cin>>n; k++; int a,b,c,d; a=n/1000; b=n/…
数据有毒,一个一个读字符是错,整个字符串读入,一次就A了. 总之,数据总是没有错的,还是对c++了解地不够深刻,还有,在比赛中,一定要有勇气重构代码 错误代码: #include<iostream> #include<cstring> #include<cstdio> using namespace std; int main() { int T,t; scanf("%d",&T); char a[1024]; getchar(); whil…
毒瘤哇!为什么要用long long 啊!!!这个题没有加法操作啊,为什么会爆int啊!!!! 思路: http://www.cnblogs.com/buerdepepeqi/p/9048130.html 来源于此. 尺取法 说一下,虽然stl在某些情况下,跑的比较慢,但是它的那些函数名,在某些意义上起到了注释的作用,而且写起来也确实方便一些. #include<cstdio> #include<algorithm> #include<set> #define ll l…
不要用gets!不要用gets!不要用gets! 不要用gets!不要用gets!不要用gets! 不要用gets!不要用gets!不要用gets! 不要用gets!不要用gets!不要用gets! #include<iostream> #include<cstring> #include<cstdio> using namespace std; int f[125]; char ord[3][15]={"LEFT","RIGHT"…
题目链接 Problem Description zk has n numbers a1,a2,...,an. For each (i,j) satisfying 1≤i<j≤n, zk generates a new number (ai+aj). These new numbers could make up a new sequence b1,b2,...,bn(n−1)/2. LsF wants to make some trouble. While zk is sleeping, Ls…
题目链接 Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Yuta has n positive A1−An and their sum is m. Then for each subset S of A, Yuta ca…
题目链接 Problem Description In the mathematical discipline of graph theory, a bipartite graph is a graph whose vertices can be divided into two disjoint sets U and V (that is, U and V are each independent sets) such that every edge connects a vertex in…
题目链接 Problem Description Have you ever seen the wave? It's a wonderful view of nature. Little Q is attracted to such wonderful thing, he even likes everything that looks like wave. Formally, he defines a sequence a1,a2,...,an as ''wavel'' if and only…