随笔分类 -  HDU

摘要:2019 Multi-University Training Contest 3 题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=6609 题意:给一个序列, 对于第i个元素,要将前在前i个中取出k个数再和第i个数一起求和,将剩下的去除,对每个i要求k最 阅读全文
posted @ 2019-07-30 00:32 mile-star 阅读(311) 评论(0) 推荐(0)
摘要:题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=6608 2019暑假杭电多校Contest 3 1006 题意:给定一个大素数P, 找到第一个比P小的素数Q, 求Q的阶乘对P取模的结果 思路:威尔逊定理:对于一个素数P,(P-2)! = 1 (mod 阅读全文
posted @ 2019-07-29 23:57 mile-star 阅读(289) 评论(0) 推荐(0)
摘要:Fibonacci again and again 利用SG函数求出每一堆的SG值,如果三个值的异或和为零 先手必败态,否则,先手必胜态。 1 #include <bits/stdc++.h> 2 #define scanf_d(a) scanf("%d",&a) 3 #define scanf_d 阅读全文
posted @ 2019-04-05 15:52 mile-star 阅读(327) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2084 #include <map> #include <cstdio> #include <stack> #include <cmath> #include <queue> #include <string> # 阅读全文
posted @ 2019-03-26 00:22 mile-star 阅读(122) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2602 01背包 1 #include <map> 2 #include <cstdio> 3 #include <stack> 4 #include <cmath> 5 #include <queue> 6 #i 阅读全文
posted @ 2019-03-25 23:58 mile-star 阅读(140) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1232 并查集入门,模板题 1 #include <bits/stdc++.h> 2 #define maxn 1005 3 typedef long long ll; 4 using namespace std; 阅读全文
posted @ 2019-03-25 22:34 mile-star 阅读(136) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1166 1 #include <bits/stdc++.h> 2 #define lid id<<1 3 #define rid id<<1|1 4 #define maxn 50005 5 using names 阅读全文
posted @ 2019-03-25 22:30 mile-star 阅读(150) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1010 1 #include <cstdio> 2 #include <cstring> 3 #include <iostream> 4 #include <algorithm> 5 #include <cmath 阅读全文
posted @ 2019-03-25 22:28 mile-star 阅读(177) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1008 1 #include <bits/stdc++.h> 2 #define lid id<<1 3 #define rid id<<1|1 4 #define maxn 50005 5 using names 阅读全文
posted @ 2019-03-25 22:24 mile-star 阅读(169) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1021 1 #include <map> 2 #include <cstdio> 3 #include <stack> 4 #include <cmath> 5 #include <queue> 6 #includ 阅读全文
posted @ 2019-03-25 22:22 mile-star 阅读(112) 评论(0) 推荐(0)
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1009 1 #include <map> 2 #include <cstdio> 3 #include <stack> 4 #include <cmath> 5 #include <queue> 6 #includ 阅读全文
posted @ 2019-03-25 22:20 mile-star 阅读(152) 评论(0) 推荐(0)
摘要:I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 111729 Accepted Submission(s): 41744 Pr 阅读全文
posted @ 2019-03-15 13:56 mile-star 阅读(140) 评论(0) 推荐(0)