Despacito_Wang
Despacito_Wang
全部文章
未归档
归档
标签
去牛客网
登录
/
注册
Despacito_Wang的博客
蒟蒻!
全部文章
/ 未归档
(共49篇)
Kth
https://www.luogu.com.cn/problem/solution/P2617 1、静态整体Kth 滑稽吧...sort一遍就好了。 时间复杂度O(nlogn)O(nlogn) 空间复杂度O(n)O(n) 2、动态整体Kth 离散化后开一棵权值线段树,每个位置的值表示这个位置对应的那...
C++
2022-08-30
0
442
离散化
//数组离散化! #include<bits/stdc++.h> using namespace std; const int N = 5e5+9; int a[N],b[N]; typedef long long ll; int main() { scanf("%d",&...
C++
2022-08-18
0
299
数据结构
//https://codeforces.com/gym/104053/problem/E 结构体封装了两棵线段树,实测比不封装块! pre.query(1,1,p,1,len) 是目前比b[p]小的数的总和!b为a的离散化数组! pre.query_cnt(1,1,p,1,len) 是目前比b[p...
C++
线段树
2022-08-18
0
341
STL
#include<bits/stdc++.h> using namespace std; map<int,int> mp; set<int> st; int main() { mp.insert({1,2}); mp.insert({2,4})...
C++
2022-08-08
0
394
三分模板
/*********** P3382 【模板】三分法 ***********/ #include <bits/stdc++.h> using namespace std; const int N = 20; double a[N]; int n; double f(double x) ...
C++
2022-08-05
0
279
平面图的欧拉定理
//杭电多校第六场 1010.Planar Graph /***************** * 平面图的欧拉定理 ( 分别为点, 边, 面, 连通分量的个数) V - E + F = k + 1 * 求连通分量k可以用dfs求联动块的方式! * 当然k = m - cnt (cnt为生成树...
C++
2022-08-05
0
429
双端队列广搜
分层图 01/BFS https://ac.nowcoder.com/acm/contest/45670/D #include<bits/stdc++.h> using namespace std; const int N = 2009; int n,m,k; int sx,sy,ex...
C++
2022-08-04
0
342
二分图最优匹配
https://ac.nowcoder.com/acm/problem/51316 c++ java python #include<iostream> #include<algorithm> #include<cstring> #include&...
C++
图
2022-07-17
0
312
多校补题
https://codeforces.com/gym/101933/problem/K 复杂度n的k次幂,暴力写法! #include<bits/stdc++.h> using namespace std; int n,k; const int N = 3e3+9; vector<...
C++
深度优先搜索
2022-07-16
0
286
网络流
[CQOI2015]网络吞吐量 题目背景 路由是指通过计算机网络把信息从源地址传输到目的地址的活动,也是计算机网络设计中的重点和难点。网络中实现路由转发的硬件设备称为路由器。为了使数据包最快的到达目的地,路由器需要选择最优的路径转发数据包。例如在常用的路由算法 OSPF (开放式最短路径优先) 中,...
C++
2022-07-07
0
268
首页
上一页
1
2
3
4
5
下一页
末页