sleeep3
sleeep3
全部文章
分类
题解(19)
归档
标签
去牛客网
登录
/
注册
sleeep3的博客
全部文章
(共19篇)
#题解##P2880 [USACO07JAN] Balanced Lineup G#
st算法 #include<bits/stdc++.h> using namespace std; int n,q,l,r; int arr[50010]={0}; int dpmin[50010][21],dpmax[50010][22]; void stat() { for(...
C++
2025-12-19
0
12
#题解##P1816 忠诚#
静态区间查找最值使用st算法 #include<bits/stdc++.h> using namespace std; const int N=100010; int n,m; int a[N],dpmin[N][21]; void stint() { for(int i=1;i...
C++
2025-12-19
0
16
#题解##P3382 三分#
单峰函数,使用三分 #include<bits/stdc++.h> using namespace std; int n; double l,r,ee=1e-9; double arr[15]={0}; double f(double x); double power(double x,...
C++
2025-12-18
0
14
#题解##P1883 【模板】三分 / 函数 / [ICPC-Chengdu 2010] Error Curves#
根据题意可得F(x)为单谷函数,所以使用三分法求解。 #include<bits/stdc++.h> using namespace std; double t,n,a[10010]={0},b[10010]={0},c[10010]={0},ans; const double ee=1...
C++
2025-12-18
0
17
#题解##P1083 [NOIP 2012 提高组] 借教室#
利用了差分,前缀和和二分 #include<bits/stdc++.h> using namespace std; const int N=1e6; long long n,m,j[N+10],sh[N+10],st[N+10],ed[N+10],diff[N+10],pre[N+10]...
C++
2025-12-11
0
20
#题解##P2678 [NOIP 2015 提高组] 跳石头#
我选择用二分答案来解决 #include<bits/stdc++.h> using namespace std; int arr[50010]={0}; int l,n,m; bool pd(int a)//判断是否满足移除m块岩石//传入枚举的答案长度 { int num=0,...
C++
2025-12-11
0
13
#题解##UVA11572#
我使用了c++的set容器,set容器具有去重 #include<bits/stdc++.h> using namespace std; set<int>v; int main() { int jc; int t; cin>>t; ...
C++
2025-12-11
0
20
#题解##POJ-3061#
利用尺取法的反向扫描 #include<iostream> #include<algorithm> #include<vector> #include<stack> #include<string> #include<cstdio&g...
C++
2025-12-11
0
15
题解 | #HDU2527#
哈夫曼树 #include<iostream> #include<algorithm> #include<vector> #include<stack> #include<string> #include<cstdio> #in...
C++
2025-12-05
0
15
题解 | #洛谷P1030求先序排列#
利用递归以及后序排列最后一位为根解决。 #include<iostream> #include<algorithm> #include<vector> #include<stack> #include<string> using names...
2025-12-05
0
20
首页
上一页
1
2
下一页
末页