摘要: #ssh 登录 ##远程登录服务器 ssh user@hostname ##配置文件 创建文件 ~/.ssh/config #config的文件内容 Host myserver1 HostName IP地址或域名 User 用户名 Host myserver2 HostName IP地址或域名 Us 阅读全文
posted @ 2022-04-20 14:24 warmhearthhh 阅读(55) 评论(0) 推荐(0)
摘要: 线段树上找答案 题目来源 Problem - 1540 (hdu.edu.cn) #include<iostream> #include<algorithm> #include<stack> using namespace std; const int maxn = 1e6 + 10; struct 阅读全文
posted @ 2021-10-06 00:07 warmhearthhh 阅读(49) 评论(0) 推荐(0)
摘要: 线段树二分 Problem - 4553 (hdu.edu.cn) 用2个线段树分别维护男生预约的时间段和女生预约的时间段。 线段树里面保存的是最大连续子段和,空闲时间为1,预约了的话就是0。 当男生来预约的时候,只需要修改男生的线段树即可。 而当女生来预约的时候若在男生的线段树里面找不到空闲时间再 阅读全文
posted @ 2021-10-06 00:06 warmhearthhh 阅读(101) 评论(0) 推荐(0)
摘要: /* 题目描述 在 20162016 年,佳媛姐姐喜欢上了数字序列。因而她经常研究关于序列的一些奇奇怪怪的问题,现在她在研究一个难题,需要你来帮助她。 这个难题是这样子的:给出一个 1 到 n 的排列,现在对这个排列序列进行 m 次局部排序,排序分为两种: 0 l r 表示将区间 [l,r][l,r 阅读全文
posted @ 2021-10-06 00:01 warmhearthhh 阅读(51) 评论(0) 推荐(0)
摘要: 树上求和 https://ac.nowcoder.com/acm/problem/19428 #include<bits/stdc++.h> using namespace std; const int maxn=1e5+10; const int MOD=23333; #define ll lon 阅读全文
posted @ 2021-10-06 00:00 warmhearthhh 阅读(44) 评论(0) 推荐(0)
摘要: LCA LCA ver1 int LCA(int u, int v) { if (D[u] < D[v])swap(u, v);//保证D[u]>D[v] //2^L 是不小与树的高度的最小的2的幂,其中L=ceil(log2(n)); for (int h = L; h >= 0; h--)//让 阅读全文
posted @ 2021-10-05 23:58 warmhearthhh 阅读(113) 评论(0) 推荐(0)
摘要: P5494 【模板】线段树分裂 题目链接P5494 【模板】线段树分裂 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) /* 给出一个可重集 aa(编号为 11),它支持以下操作: 0 p x y:将可重集 pp 中大于等于 xx 且小于等于 yy 的值放入一个新的可重集中 (新可 阅读全文
posted @ 2021-10-05 23:57 warmhearthhh 阅读(54) 评论(0) 推荐(0)
摘要: /*离散化思路 和一般的离散化不同 多了个中间加点操作具体为啥要加点1-10 1-4 6-10这三个区间离散化后 5 这个点会丢掉。加点防止丢点。。。。。。。hhhh总结 排序 去重 中间加点 再排序*/2528 -- Mayor's posters (poj.org)#include<iostre 阅读全文
posted @ 2021-08-07 19:26 warmhearthhh 阅读(38) 评论(0) 推荐(0)