shyyhs
shyyhs
全部文章
分类
DP专题(52)
图论(4)
多校补题(2)
数据结构(27)
数论(4)
日记(14)
未归档(38)
题解(330)
归档
标签
去牛客网
登录
/
注册
shyyhs的博客
TA的专栏
440篇文章
0人订阅
lpt的小屋
415篇文章
3802人学习
AtCoder思维大提升
6篇文章
628人学习
kuangbin专题记录
0篇文章
0人学习
牛客每日一题推介(裙子计划~)
19篇文章
699人学习
全部文章
(共469篇)
珂朵莉的数列
来自专栏
emmm,我觉得是水题. 另外存下__int128的输入输出~好困啊! #include <bits stdc++.h> using namespace std; typedef long long ll; const int N=1e6+50; ll n; ll w[N],c[N],v...
树状数组
__int128
2021-01-20
1
654
Running Median
来自专栏
进阶指南原题(对顶堆一下.),原来快读可以减少空间. #include <bits/stdc++.h> using namespace std; inline int read() { int s = 0, w = 1; char ch = getchar(); whil...
优先队列
2021-01-20
1
675
过河
来自专栏
把数组开到极限,以及将可以在中间转化的值全部消除然后进行dp即可. #include <bits/stdc++.h> using namespace std; const int mod=2*3*4*5*6*7*8*9*2; const int N=1e2+5; const int M=...
dp
2021-01-20
3
510
背包
来自专栏
我觉得直接二分答案就好了,不需要讨论,只需要将数组按容量大小排序。我觉得答案是有二分性的。
二分
2021-01-18
2
642
旅游
来自专栏
思路: 简单的思考一下,这题就是没有上司的舞会.首先,我假如选了这个点,那么它的子节点都不能选,假如我这个点选了的话,那么它的子节点既可以选,又可以不选. 代码: #include <bits/stdc++.h> using namespace std; const int N=5e5+...
树形dp
2021-01-16
4
661
New Year Tree
来自专栏
回去再调. #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N=4e5+5; ll col[N]; vector<int>g[N]; int now[N],last[N...
树链剖分
2021-01-15
2
564
[HAOI2006]旅行COMF
来自专栏
思路: 判断两点是否联通,可以用并查集来判断.如果起点和终点联通了,那么我们不妨枚举最大边是多少,然后按顺序枚举那条较小边是多少.然后取个min就是最终的答案了. 代码: #include <bits/stdc++.h> using namespace std; const int N=...
DSU
2021-01-14
3
559
(构造一个水题留着以后无聊出比赛用.)
来自专栏
#include <bits/stdc++.h> using namespace std; const int N=105; int f[N];//从0跳到当前石头最少需要几次. int pos[N]; int main() { int l;scanf("%d&quo...
dp
2021-01-13
0
463
子序列
来自专栏
讲道理..这题我是思路秒代码秒的一题,很顺利...(为啥别人题解写了那么多啊 #include <bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e2+5; const int mod=1e9+...
数学
dp
2021-01-13
2
489
maze
来自专栏
前言: 喷死这题,lj死了.出口也有陷阱,大家要小心哦! 思路: 直接bfs+优先队列就好了. 代码: #include <bits/stdc++.h> using namespace std; const int N=3e2+5; struct xb{ int x,y; }st...
BFS
优先队列
2021-01-13
12
950
首页
上一页
8
9
10
11
12
13
14
15
16
17
下一页
末页