自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 D. Fragmentation merging

原题 题目大意: 可以将两个集合A,B合并成一个超集合C,条件如下: 1.max(A(),B())=的个数 2.. 求超集合C的种类数 例如:{1,2}{}={1,2}; {1,3}{2,4}={1,2,3,4}; 而{1,3}{4}则不合法 所以转换成从i开始有多少段最多段数为2的区间。 用num记录段数 因此首先记录坐标,以遍历vis[i]=1; 若vis[p[i]-1]&&vis[p[i]+1]则说明用p[i]将两段进行连接,num-- 若vis[p[

2022-05-04 08:24:49 200

原创 C.Constant Ratio

Given an integer n, find out number of ways to represent it as the sum of two or more integers ai with the next property: ratio ai / ai - 1 is the same positive integer for all possible i > 1. 原题:这里 题目大意: 给定n,找到合法序列的个数。给定规则如下: 1., 2. 即等比数列。 等比数列求

2022-04-20 19:03:21 181

原创 链式前向星

链式前向星 const int manx=1e5+5; int cnt=0; int head[maxn]; struct node{ int to,dis,next; }edge[maxn]; void Add_edge(int from,int to,int w) { edge[++cnt].to=to; edge[cnt].dis=w; edge[cnt].next=head[from]; head[from]=cnt; } int main() { int n;cin>>n;

2021-05-26 12:35:31 73

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除