
HDU
文章平均质量分 92
consult_
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Invoker(2019ccpc秦皇岛)
Invoker 费了九牛二虎之力搞出来了,记录一下。 道路很曲折,代码写完了才发现一开始无脑屏蔽掉了出现数次的unordered,常识地以为是ordered 。 由于连招是无序的,并且三个连招只有六种排列组合,所以我们把每个连招可能的组合排列出来就可以转移状态了 dp[i][j] 表示:到第 i 位 选择 第 j 种连招所获得的最小代价。 所以每个 dp[i][j] 要从 第 i-1 位的 0 - 6 种 连招转移过来。 最后就是两个连招相邻连招的节约计算; #include<bits/stdc++.原创 2020-09-22 17:46:05 · 234 阅读 · 0 评论 -
2020 Multi-University Training Contest 6
1002 Little Rabbit’s Equation 有两个注意点:题目中说有前导0得注意,其次就是最小的进制为2,注意判别; #include<bits/stdc++.h> using namespace std; typedef unsigned long long LL; const int mod = 998244353; const int N = 6e6+7; LL fun(string s,LL ans){ LL x=0,i=0; while(s[i]=='0'&原创 2020-08-09 21:16:35 · 145 阅读 · 0 评论 -
2020 Multi-University Training Contest 5
1001 Tetrahedron 首先,a,b,c都是随机出自同一个区间,所以a,b,c的期望都相同,所以底面三角形为等边三角形,所以 h 的另一端为三角形的重心,然后就可以求出 1h2=3c2\frac{1}{h^2} =\frac{3}{c^2}h21=c23,所以求出 1c2\frac{1}{c^2}c21 的期望即可,注意此时求期望的数组是[1,14,19…1n2][1,\frac{1}{4},\frac{1}{9}…\frac{1}{n^2}][1,41,91…n21],然后按定义原创 2020-08-09 18:11:04 · 132 阅读 · 0 评论 -
2020 Multi-University Training Contest 4
1011 Kindergarten Physics 这场的签到还是很签到的,由于所给的重量和时间都小于等于100,所以减少的距离精度一定小于1e-6,所以直接在原距离上减个更小的精度即可; #include<iostream> using namespace std; int main() { int T; cin>>T; while(T--){ double a,b,d,t; cin>>a>>b>原创 2020-08-02 19:26:37 · 187 阅读 · 0 评论 -
2020 Multi-University Training Contest 3
1004 Tokitsukaze and Multiple(贪心) 题目大意: 给定n个数,相邻的数之间能合并相加,问最多能有几个分段和能被p整除。 思路: 显然我们贪心的从前往后遍历,一旦这段和能被p整除就把这段合并,然后往后再找,这样最终获得的p的倍数的数一定是最多的。 如何确定这段和是p的倍数:维护前缀和%p,当出现了两个相同的余数时,那么这两个位置之间(左开右闭)的元素和一定是p的倍数。(老套路了 Code1: 对于每个子段区间,利用map记录上一个出现相同余数的位置。当此段结束时清空map #in原创 2020-08-01 23:53:56 · 184 阅读 · 0 评论 -
2020 Multi-University Training Contest 2
1010 Lead of Wisdom(爆搜优化) Problem Description In an online game, “Lead of Wisdom” is a place where the lucky player can randomly get powerful items. There are k types of items, a player can wear at most one item for each type. For the i-th item, it has fo原创 2020-07-27 15:52:32 · 274 阅读 · 0 评论 -
CRB and String
CRB and String (字符串思维题) Problem Description: CRB has two strings s and t. In each step, CRB can select arbitrary character c of s and insert any character d (d ≠ c) just after it. CRB wants to convert s to t. But is it possible? Input: There are multiple原创 2020-07-21 16:35:36 · 227 阅读 · 0 评论 -
18级个人训练
2019CCPC-江西省赛(重现赛)传送门 HDU Wave 挺不错的一个题,有双指针的思想 #include<iostream> #include<algorithm> #define LL long long using namespace std; const int N = 1e5+7; int main() { int n,c,ans=0; cin>&...原创 2019-11-17 21:20:33 · 137 阅读 · 0 评论