返回顶部
摘要: ##2020/10/18 湖南省赛金 ##2020/11/8/ccpc长春区域赛银 阅读全文
posted @ 2020-11-11 22:08 League-of-cryer 阅读(107) 评论(0) 推荐(0)
摘要: 题目后面的标识代表的意思 !!! 表示可补题 表示水题 +++ 表示需掌握 ??? 表示神仙题 如有错误自行修改 阅读全文
posted @ 2020-09-28 21:34 League-of-cryer 阅读(99) 评论(0) 推荐(0)
摘要: 长见识了,莫队还能这样用 根据 f(n,m+1)=f(n,m)+C(n,m+1) 以及 f(n+1,m)=2*f(n,m)-C(n,m) 这两个式子 把m和n分别看作l和r 预处理阶层和逆元以后就能套莫队了 一直在想怎么离线 就没想到莫队上面去 看似很数论的一道题 其实是莫队 #include<bi 阅读全文
posted @ 2021-03-17 15:08 League-of-cryer 阅读(223) 评论(0) 推荐(0)
摘要: ##246 / 336 A Secrete Master Plan ##2 / 32 B Build Towers ??? ##117 / 487 C The Battle of Chibi +++ ##112 / 578 D Pick The Sticks +++ ##34 / 158 E Ba 阅读全文
posted @ 2021-02-28 00:20 League-of-cryer 阅读(76) 评论(0) 推荐(0)
摘要: ##64 / 441 A HDU 5961 !!! 思路: 代码: #include<bits/stdc++.h> #define ll long long using namespace std; #define maxn 2500 bitset<maxn>ea[maxn]; bitset<max 阅读全文
posted @ 2021-02-25 16:13 League-of-cryer 阅读(76) 评论(0) 推荐(0)
摘要: #include<stdio.h> #include<string.h> #define ll long long ll w[150],q[150],dp[150][2][2][2]; #define mod 1000000007 ll getans(int pos,int flaga,int fl 阅读全文
posted @ 2021-02-21 20:00 League-of-cryer 阅读(61) 评论(0) 推荐(0)
摘要: 贴个答案,dp[i]代表状态i最多可获得多少魔法石 #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; int dp[1<<21],cnt[25][15],num[10]; int g,b,s; 阅读全文
posted @ 2021-02-19 22:18 League-of-cryer 阅读(54) 评论(0) 推荐(0)
摘要: 501 / 529 A HDU 5007 Post Robot 83 / 443 B HDU 5008 Boring String Problem !!! 111 / 784 C HDU 5009 Paint Pearls +++ 6 / 57 D HDU 5010 Get the Nut ??? 阅读全文
posted @ 2021-02-09 00:14 League-of-cryer 阅读(46) 评论(0) 推荐(0)
摘要: 102 / 743 A HDU 5572 An Easy Physics Problem !!! 能踩的坑都踩了 太菜了 先看射线和圆是否相交 不相交直接求解 否则算出A与圆的首个交点n 得出A的对称点 看B是否在反射的射线上即可 #include<cstdio> #include<cstring> 阅读全文
posted @ 2021-02-07 00:00 League-of-cryer 阅读(94) 评论(0) 推荐(0)
摘要: 原题链接 题意:你的书架上有n本书,每本书有一个颜色,假如同一种颜色的书放在一起,那你的书架就是好的,第i本书的颜色是a[i],每次操作可以选一本书,将其位置放到最后,问最少多少次操作可以让你的书架变好 题解:l[x]表示最左边x颜色的书的位置,r[x]表示最右边x颜色的书的位置,f[x]表示第x本 阅读全文
posted @ 2021-02-06 15:43 League-of-cryer 阅读(81) 评论(0) 推荐(0)
摘要: 中文题面 题解:记模m的原根为yg,yg的i次幂mod m(0<=i<=p-2)与1到p-1是有一个一一对应关系的,如果我们相求a*b%mod=c%mod,我们可以把a和b换算为对应的$\(*\)\(=\)\(,即\){(a1+b1)mod(m-1)}\(=\)\(,因为\){(m-1)}$=1(m 阅读全文
posted @ 2021-02-05 00:16 League-of-cryer 阅读(73) 评论(0) 推荐(0)
摘要: 显然题意要我们能动态的维护重心 重心有个性质就是:连接两棵树 新树的重心会在子树重心的连接线上 那么我们考虑用lct维护 加边操作不说了 关键是如何找到新树的重心 设连接前的两个点为x,y 两棵树的重心分别为wx,wy 那么我们先连接x,y 在split出wx,wy这条路径 根据重心的性质 当我们以 阅读全文
posted @ 2021-02-02 16:42 League-of-cryer 阅读(130) 评论(0) 推荐(0)