![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM个人赛
「已注销」
这个作者很懒,什么都没留下…
展开
-
B - Marjar Cola ZOJ - 3948(模拟)
TL了好多遍,不知道哪里出的问题,求大佬指出: 附错误代码: #include<iostream> #include<cstdio> using namespace std; int x, y, a, b; int T; int main() { scanf("%d", &T); for(int t = 0; t < T; t++) ...原创 2019-04-25 21:52:32 · 114 阅读 · 1 评论 -
A Math Problem HDU - 6182
题目不难,但要注意几个细节: 1.注意条件,是k的k次方 2.用i的i次方时千万不要用pow()函数,这样会WA,虽然不知道为啥,应该是浮点数的原因。 #include<iostream> #include<cstdio> using namespace std; int main() { unsigned long long n; while...原创 2019-05-01 22:22:10 · 157 阅读 · 0 评论 -
Humble Numbers HDU - 1058(打表,模拟)
原题链接 #include<iostream> #include<algorithm> #include<cstdio> using namespace std; int dp[5850] = {0, 1}; int main() { int n, i; int x1, x2, x3, x4; int dp1, dp2, dp3, ...原创 2019-05-19 10:24:49 · 233 阅读 · 0 评论 -
K Balanced Teams CodeForces - 1133E (Dp)
题意: 给出n个数,选取其中若干个数分别组成至多k组,要求每组内最大值与最小值的差值不超过5,求最后被选上的总人数。 题解: 将a[1∼n]从小到大排序, f[i][j]表示到第i个数为止,已经组成j组,最多可以包含多少个数。 那么,考虑第i个数选取与否,如果不选,那么, 如果选,那么必然是第i个数所在组人数加上前面那些组人数,假设p表示距离...原创 2019-05-26 11:13:49 · 261 阅读 · 0 评论