自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 mmysql8 maven项目启动报错 时区问题(最好用mysql5.0)lombok使用方法

上图是mysql5配置8.0配置(1)pom.xml 引入依赖 <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.20</version></dependency>(2)要在appl.

2020-07-01 18:40:17 345

原创 myeclipse maven项目Imorting Maven projects has encountered a problem pom标红原因:maven默认仓库缺少setting配置文件

修改一下setting里面的配置,因为放到C盘会下载很多jar包占用大量空间新建maven工程pom.xml在一对之间添加如下<!-- 添加Servlet支持 --> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>3.1.0</ve..

2020-07-01 12:10:18 643

原创 myeclipse使用egit 提交云端项目

前置条件(未安装git bash 、tortoise git 、进行egit相关操作的同学):Git bash配置:https://support.huaweicloud.com/usermanual-codehub/codehub_hlp_0001.htmltortoise安装配置 tortoise git 保存私钥参考如下连接:https://blog.csdn.net/xiezhongyuan07/article/details/79411299TortoiseGit安装后 安装向导无法勾选

2020-06-27 18:23:31 218

原创 L1-027 出租 L2-014 列车调度 set二分

https://pintia.cn/problem-sets/994805046380707840/problems/994805107638517760#include<bits/stdc++.h>using namespace std;typedef long long ll;#define IO ios::sync_with_stdio(false);cin.tie(0...

2020-03-04 22:04:05 122

原创 POJ3984 迷宫问题记录路径递归 bfs HDU1242 dfs Codeforces25D.Roads in Berland floyd优化 HDU1874畅通工程续 floyd/spfa/dj

#include<iostream>#include<queue>#include<cstdio>using namespace std;typedef long long ll;const int maxn=2e5+5;ll n,sx,sy,ex,ey;//0:先序 1:镜像先序 ll maze[5][5],vis[5][5];ll dir[...

2020-03-04 10:09:10 167

原创 L2-032 彩虹瓶 栈 有另一个容器暂时存 L3-002 特殊堆栈 L3-003 社交集群 L3-001凑零钱dfs L1-019. 谁先倒 L2-004 这是二叉搜索树吗 L1-009N个数求和

https://pintia.cn/problem-sets/994805046380707840/problems/1111914599412858889#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=2e5+5;ll n,m,k,a[maxn],f,num,s;...

2020-03-01 20:45:52 152

原创 Codeforces1313B.Different Rules 构造1700

#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e5+5;#define IO ios::sync_with_stdio(false);cin.tie(0);ll n,t,x,y;int main(){ cin>>t; while(t--){ ...

2020-03-01 10:25:07 103

原创 HDU1257 最少拦截系统 1e5/1e3 LIS 二分单调栈nlogn 多组输入

给你一串序列 让你找到最长不上升子序列的长度 和 最少有几个不上升子序列样例就是389 300 299 170 158 65是最长不上升子序列那么最多有两个不上升子序列 另一组就是207 155求最长不上升子序列的组数就是求最长上升子序列的长度对于后面的飞机,若当前有一套系统发射高度大于等于飞机高度,则这套系统的发射高度更新为飞机高度若没有一套系统发射高度大于等于飞机的高度,则需要新的系...

2020-02-27 22:17:35 128

原创 2020牛客寒假算法基础集训营6 J-签到题 Yes不能大写 G括号序列 T组样例要清空栈 A配对k大 n-k+1小 原数组sort F 十字阵列 注意超时5e5次询问 D重排列 C汉诺塔LIS

#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e6+5;ll T,n,ans;double a,b,c,r[4];string s;int main(){ cin>>a>>b>>c; if(a+b>c &amp...

2020-02-26 19:15:19 200

原创 Codeforces1307D 加边最短路最大化

n<=2e5scanf printf比cin cout快5倍autotoNumber = [&] (string const &s)->unsigned{…}#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=2e5+5;const i...

2020-02-25 17:19:32 306

原创 Codeforces1307B.Cow and Friend几何 C. Cow and Message dp

n 个喜欢的数字,每次只能跳他喜欢的数字,从 (0,0) 到 (x,0) 最少需要多少步?一直选择最大的那个跳如果距离是最大步数的倍数那就是沿着 x 轴跳,如果不是到最后距离小于最大步数了,那么我们就跳一个等腰三角形。最大距离大于两个兔子的距离,直接跳一个等腰三角形。n=2 x=43 5maxx=5>x=4(2, sqrt(21) )#include<bits/st...

2020-02-23 22:46:09 152

原创 dp LIS nlogn

#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=2e5+5;const int mod=1000;ll t,n,dp[maxn];struct node{ ll w,h;}a[maxn];bool cmp(node a,node b){ return a....

2020-02-23 18:25:24 118

原创 错排问题 方案数

错排原理:https://www.luogu.com.cn/blog/P6174/post-cuo-pai#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=2e5+5;const int mod=1000;ll t,n,a[1005],sum[1005][1005...

2020-02-23 17:58:24 225

原创 dp基础题 分组乘积最大和 sum[i][j]预处理

#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=2e5+5;const int mod=1000;ll t,n,dp[1005],a[1005],sum[1005][1005];string s;int main(){ cin>>n; for(...

2020-02-23 16:51:33 211

原创 Codeforces1304B 字符串STL构造最长回文 C. Air Conditioner 温度范围双指针 D双指针构造LIS最短最长

考虑本身回文 和 nnm寻找互相回文本身回文有多个 因为长度都为m 找出现次数最大的自身回文的串4 2oooxxoxx6oxxxxo9 4ababbabaabcdbcdecdefdefgwxyzzyxwijji20ababwxyzijjizyxwbaba#include<bits/stdc++.h>using namespace std;t...

2020-02-21 13:07:48 164

原创 Codeforces1301B. Motarack's Birthday 三分 C. Ayoub's function字符串至少含1的子串数

https://codeforces.com/contest/1301/problem/B不存在的值-1表示 求使数组的最大差值最小 0<=ai<=1e9输出m表示差值 k表示-1位置的统一值最优k 减小或增大都会使差值超增大的趋势发展 是个关于最优k的凹函数注意:自己三分搞精度 l+5<=r 最后l,r之间大概5个左右的范围再判断哪一个位置maxx更小...

2020-02-20 11:37:09 194

原创 Codeforces1303B. National Project 求余周期 C. Perfect Keyboard 字符串vector,set,map模拟

35 1 18 10 101000000 1 100000058499999500000#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e6+5;ll n,g,b,t;string s;int main(){ cin>>t; whi...

2020-02-18 19:16:35 135

原创 Codeforces1300C. Anu Has a Function D几何 对称图形 E 2100 单调栈

给n个数,两个数之间相或,后减去后一个数,求如何排序,使得最终结果越大。发现只要找出一个最优的数后,其余数顺序任意,因为,一旦有两个数,同时有1出现在同一位上,则不论如何计算该位必为0。第一个数,应为在所有数中,二进制单独只为1,所表示的10进制数最大,即为最优解。没有只有一位1有个1的话 输出原顺序#include<bits/stdc++.h>using namespace...

2020-02-17 12:23:52 107

原创 B-牛牛战队的比赛地 三分法 模板

https://blog.csdn.net/qq_33199236/article/details/53437875 三分极值 3分之#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e5+5;const double eps=1e-6;#define endl ...

2020-02-15 10:09:49 115

原创 2020牛客寒假算法基础集训营5 H hash26进制 E取石子 2的幂次 D 1/3次方 模拟 F题经典dp

#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=2e5+5;#define fi first#define se secondtypedef long long ll;typedef pair<int,int> pii;const double e...

2020-02-15 09:23:56 156

原创 2020牛客寒假基础算法训练营4 D子段异或 前缀异或和 F dfs树上深度 B 括号匹配 C子段乘积 双指针/线段树 A找规律/斐波那契数列 E模拟字符串加法大数加

Dal…ar=sum[r]^sum[l-1]=0 1-r 1-l-1异或抵消前面相同的为l-r异或mp[0]=1必须写#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=2e5+5;ll n,a[maxn],sum[maxn],ans;map<ll,ll&...

2020-02-11 19:44:44 151

原创 Codeforces1296B模拟 C二维坐标 pair map D 贪心取余

https://codeforces.com/contest/1296/standings对数s 每次spend x obtain x/10下取整最终spend最大值10ans=119876ans=10973#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=...

2020-02-11 12:38:35 207

原创 2020牛客寒假算法训练营day3 A bfs/dp 取模 I汉诺塔 找规律

#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=55;const int mod=1e9+7;ll n,m;char c[maxn][maxn];ll dp[maxn][maxn];int main(){ cin>>n>>m; for...

2020-02-08 22:45:28 173

原创 Codeforces1291B. Array Sharpening 构造先增后减 C贪心1700

数组符合先严格递增后递减 0=<ai<=1e9 n<=3e5ai-=1任意次直接递增或递减也成立101248618312 10 86100 11 15 9 7 840 1 1 020 020 121 021 130 1 031 0 1YesYesYesNoNoYesYesYesYesNohttps://code...

2020-02-07 21:36:15 215

原创 2020牛客寒假基础算法训练营day2 C概率dp D数三角 F拿物品贪心 E做计数 G判正误 大数ksm模板 H施魔法dp

#include<bits/stdc++.h>using namespace std; const int maxn = 2005;typedef long long ll; const ll mod=1e9+7;ll n,ans,a[maxn],b[maxn],dp[maxn][maxn];int main() { cin>>n; for(i...

2020-02-06 18:45:00 220

原创 Codeforces1294F. Three Paths on a Tree 树的直径

https://www.cnblogs.com/overrate-wsj/p/12231134.html#include<bits/stdc++.h>using namespace std;const int maxn=2e5+5;#define pb push_backtypedef long long ll;int n,x,y;vector<int> v...

2020-02-05 20:18:56 181

原创 2020牛客寒假基础算法训练营1 I dp

#include<bits/stdc++.h>using namespace std;const int maxn=3e5+5;typedef long long ll;ll n,a,b,c,dp[maxn],maxx;//到i位置分数最大值 string s;int main(){ cin>>n>>a>>b>>c; ...

2020-02-04 20:24:03 258

原创 C. Dawn-K's water 完全背包

01背包中每种物品只有一件,取或者不取。完全背包则每件物品都有无数件,那么可以取很多件。每个物品最优拿法=max(不拿,拿一个,拿两个,...,拿n个),抛出个问题,n难道是无限吗?显然不是,大前提是b不超过背包总空间或者说处理到第i个物品时剩余空间有限01背包中逆序是因为dp[i][]只和dp[i-1][]有关,且第i件的物品加入不会对dp[i-1][]状态造成影响。完全背包则考虑...

2020-02-04 11:39:49 170

原创 Camp Day2 1前缀后缀和 3nim博弈相关 异或 5子树编号排序相邻差的平方和

#include<bits/stdc++.h>using namespace std;#define maxn 1000050#define IO ios::sync_with_stdio(false);cin.tie(0);typedef long long ll;ll T,n,k,suff[maxn],suf[maxn],pre[maxn],sum[maxn];doub...

2020-02-04 11:39:05 187

原创 Camp Day1 2签到 减法取模逆推 8 gcd

81-n k的倍数 比k大 n/k下取整个 爆ll 大数#include<bits/stdc++.h>using namespace std;#define maxn 100000int ans[maxn],T,n,k;string num;bool isprime(int x){ for(int i=2;i<=sqrt(x);i++){ if(x%i==0)...

2020-02-04 11:39:05 131

原创 Codeforces816B 差分数组前缀和 好题

n种调料 温度区间 li-ri查询 1杯咖啡有个温度区间【a,b】 只要该温度下加的调料>=k种该温度下为1杯好的咖啡 求该温度区间下好咖啡的数量(1 ≤ li ≤ ri ≤ 200000)n, k (1 ≤ k ≤ n ≤ 200000)(1 ≤ a ≤ b ≤ 200000)输入n,k,q接下来n种调料的温度区间接下来q次查询 咖啡的温度区间3 2 491 949...

2020-02-04 11:38:44 208

原创 Codeforces1208C 分块螺旋构造

0 1 2 3 16 17 18 197 6 5 4 23 22 21 208 9 10 11 24 25 26 2715 14 13 12 31 30 29 2832 33 34 35 48 49 50 5139 38 37 36 55 54 53 5240 41 42 43 56 57 58 5947 46 45 44 63 62 61 60分块数nn/16=4 开根2行2列分...

2020-02-04 11:38:33 87

原创 Codeforces1294C. Product of Three Numbers 找因子 D. MEX maximizing 求余

根号n范围内一定有2个因子才是YES n不断变化除以因子#include<bits/stdc++.h>using namespace std;typedef long long ll;#define IO ios::sync_with_stdio(false);cin.tie(0);#define endl '\n'const int maxn=2e5+5;ll n,t;...

2020-02-04 11:34:55 138

原创 POJ 1182 食物链 种类并查集向量思维模式/扩展域并查集

https://blog.csdn.net/qq_42505741/article/details/81104742#include<iostream>#include<cstdio>using namespace std;typedef long long ll;#define IO ios::sync_with_stdio(false);cin.tie(0);...

2020-02-03 20:40:20 878

原创 Codeforces766D Mahmoud and a Dictionary 种类并查集/扩展域并查集

https://blog.csdn.net/qq_42505741/article/details/81104742#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e5+5;int n,m,q,pre[maxn],root[maxn],a[maxn];//root...

2020-02-03 12:59:46 313

原创 Codeforces722C 并查集

正向删除 逆向合并if else分支特判写好https://codeforces.com/contest/722/problem/C#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e5+5;ll n,a[maxn],p[maxn],res[maxn];ll p...

2020-02-02 13:38:06 281

原创 Codeforces691D并查集+优先队列 不开IO超时

用到了find 和 合并操作n,m<=1e6 m个可交换的位置对 1-n序列 求利用可交换的位置字典序最大#include <bits/stdc++.h>using namespace std;#define endl '\n'#define IO ios::sync_with_stdio(false);cin.tie(0);#define pb push_back...

2020-02-02 10:41:40 134

原创 HDU3461 并查集应用 求互不相交的区间数 MLE原因ll变量爆内存

https://blog.csdn.net/Estia_/article/details/82873771#include <bits/stdc++.h>using namespace std;#define endl '\n'#define IO ios::sync_with_stdio(false);cin.tie(0);#define pb push_backtyp...

2020-02-01 22:12:32 1387

原创 Codeforces1295C vector存字母位置 二分nlogn B. Infinite Prefixes 字符串找规律模拟 D欧拉函数值应用 素因子分解

#include <bits/stdc++.h>using namespace std;#define endl '\n'#define IO ios::sync_with_stdio(false);cin.tie(0);#define pb push_backtypedef long long ll;typedef pair<int, int> pii;t...

2020-01-31 11:11:34 162

原创 Codeforces1285B dp最大连续子序列和 变形 C lcm(a,b)=x max(a,b)尽量小 暴力

#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e6+5;const int INF=0x3f3f3f3f;ll t,n,a[maxn],maxhere,maxsum1,maxsum2;//不能取1-n全部 对1-n-1 2-n求一次最长连续子序列和 int m...

2020-01-29 09:32:21 175

空空如也

空空如也

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

TA关注的人

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