自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 E. There Should Be a Lot of Maximums

/计算完轻儿子的答案后 要把儿子的痕迹擦干净 为下一个儿子准备。//计算完轻儿子的答案后 要把儿子的痕迹擦干净 为下一个儿子准备。//计算完轻儿子的答案后 要把儿子的痕迹擦干净 为下一个儿子准备。//计算完轻儿子的答案后 要把儿子的痕迹擦干净 为下一个儿子准备。void dfs1( int u, int fa ) { //遍历整个树,找每个点的重儿子。//先算轻儿子的答案。

2023-04-03 12:35:02 276

原创 C. Helping the Nature

C. Helping the Nature

2022-06-19 22:45:23 435

原创 C - Infected Tree

C - Infected Tree题解

2022-06-11 13:37:41 352

原创 Codeforces Round #796 (Div. 2) ABCD题解

Codeforces Round #796 (Div. 2) ABCD题解

2022-06-04 16:40:40 323

原创 Codeforces Round #789 (Div. 2 题解ABCD

A 题直接照着题意模拟没什么好说的 #include<iostream> #include<stdio.h> #include<string.h> #include<queue> #include<map> #include<algorithm> #include<stack> #include<set> #include<string> #include<utility> #in...

2022-05-09 19:23:40 225

原创 B. Getting Zero

B. Getting Zero time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Suppose you have an integervv. In one operation, you can: either setv=(v+1)mod32768v=(v+1)mod32768 or setv=(2⋅v)mod3...

2022-04-10 20:46:47 621

原创 https://codeforces.com/contest/277/problem/A

大概题意就是每个人会一些语言,为了保证可以让全公司舒畅沟通要每个人再学的语言的总和 我的解法是把可以互相沟通的人视为一个群体,群体总数是n;最好得n-1是答案;没有考虑一门也不会的人无论如何都要学一门;一直没过很烦; #include<iostream> using namespace std; bool a[101][101]; bool c[101][101]; bool b[101]; void dp(int x,int n) { for(int i=0;i<n;i++)...

2022-03-12 14:55:58 375

原创 Educational Codeforces Round 124 (Rated for Div. 2)D. Nearest Excluded Points

一开始从标记点开始bfs ole 了,然后从空点开始就过了 原题链接Problem - D - Codeforces #include<iostream> #include<queue> #include<utility> #include<map> using namespace std; typedef pair<int,int>pii; map<pii,pii>ans; map<pii,int>id; map&lt

2022-03-11 18:33:15 518

原创 Educational Codeforces Round 124 (Rated for Div. 2)C. Fault-tolerant Network

原题链接Problem - C - Codeforces 题意就是两边各有电脑,每边的电脑互相之间已经连接,在破坏一台电脑的情况下还要两边可以连接成功的最小代价是 代价=abs(a[i]-b[k]); 不难猜到只要两边两端的电脑可以连接到对面就一定可以,因为可以互相之间相互连,所以最少两条线最多四条线就可以了,先预处理一下两边两端相连的代价然后就可以去比较到底用几条线好了; 代码 #include<iostream> #include<algorithm> using n

2022-03-11 15:01:07 274

空空如也

空空如也

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

TA关注的人

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