- 博客(36)
- 资源 (1)
- 收藏
- 关注
原创 二叉树的前序,中序,后序,层次遍历,判断两根树是否结构一致复习
#include <iostream>#include <algorithm>#include <vector>#include <queue>using namespace std;struct TreeNode { int val; TreeNode *left; TreeNode *right; TreeNode() : val(0), left(nullptr), right(nullptr.
2020-08-07 16:38:07 311
原创 最长回文字串
状态转移方程:边界条件: public String longestPalindrome(String s) { int n=s.length(); String res=""; boolean [][]dp=new boolean[s.length()][s.length()]; for(int l=0;l<n;l++){ for(int i=0;i+l&...
2020-07-30 14:56:10 166
转载 Load Average
使用Grafana查看图表时有个Load Average的概念。一、什么是Load Average?系统负载(System Load)是系统CPU繁忙程度的度量,即有多少进程在等待被CPU调度(进程等待队列的长度)。平均负载(Load Average)是一段时间内系统的平均负载,这个一段时间一般取1分钟、5分钟、15分钟。二、如何查看Load?top命令,w命令,u...
2020-04-19 11:54:07 786
原创 解决访问Grafana图表显示'X-Frame-Options' to 'deny
1.Grafana安装方式 通过Helm安装2.解决方法 根据Grafana配置的官方文档:https://grafana.com/docs/grafana/latest/installation/configuration/,在Grafana的values.yaml中添加security: allow_embedding: true 然后通过helm ...
2020-04-02 17:25:55 6173 4
原创 Kubernetes集群中Node节点向Master节点Harbor私有仓库Pull/Push镜像
1.设置docker.service$ gedit /usr/lib/systemd/system/docker.service在ExecStart这行增加参数--insecure-registry=<Master节点IP>2.重启docker$ systemctl daemon-reload$ systemctl restart docker...
2020-03-21 13:27:20 669
原创 Kubbernetes 强制删除POD
$ kubectl delete pod PODNAME --force --grace-period=0
2020-03-07 10:39:47 210
原创 LRU算法-灰灰漫画
转载自:https://blog.csdn.net/dQCFKyQDXYm3F8rB0/article/details/90149995
2019-08-10 20:38:22 921
原创 [CCF CSP]通信网络2017-09-4
#include <iostream>#include <stdlib.h>#include <stdio.h>#include <algorithm>#include <queue>#include <memory.h>using namespace std;int N,M;int a,b;int fl...
2019-08-08 22:36:16 317
原创 [CCF CSP]地铁重建201703-4
#include <iostream>#include <stdio.h>#include <algorithm>using namespace std;const int N=2*100000+10;struct node{ int u,v; int cost;}E[N];int n,m;int father[N];in...
2019-08-08 22:29:37 154
原创 [CCF CSP]交通规划2016-09-4
题目:http://118.190.20.162/view.page?gpid=T44#include <iostream>#include <stdio.h>#include <algorithm>#include <vector>#include <stack>#include <queue>#inclu...
2019-08-08 22:00:28 272
原创 [CCF CSP]学生排队2017-03-2
题目连接:http://118.190.20.162/view.page?gpid=T56#include <iostream>#include <stdio.h>#include <algorithm>using namespace std;int n,m;int table[1010];int pos[1010];int main()...
2019-08-08 16:29:56 142
原创 [CCF CSP]压缩编码2016-12-4
题目连接:http://118.190.20.162/view.page?gpid=T49#include <iostream>#include <algorithm>#include <stdio.h>using namespace std;const int INF=1<<30;int dp[1010][1010],a...
2019-08-08 16:29:47 147
原创 [CCF CSP]网络延时2015-03-4
题目:http://118.190.20.162/view.page?gpid=T24#include <iostream>#include <queue>#include <algorithm>#include <stdio.h>#include <stdlib.h>#include <memory.h>u...
2019-08-08 13:50:12 167
原创 [CCF CSP]最优灌溉201412-4
题目:http://118.190.20.162/view.page?gpid=T18#include <iostream>#include <algorithm>#include <algorithm>using namespace std;int father[1010];struct Node{ int x,y; in...
2019-08-08 12:54:28 208
原创 [CCF CSP]最优配餐2014-09-4
题目链接:http://118.190.20.162/view.page?gpid=T13#include <iostream>#include <stdio.h>#include <queue>using namespace std;const int N=1001;int n,m,k,d;int fx[4]={0,0,-1,1};int ...
2019-08-08 11:58:42 173
原创 [CCF CSP]无线网络2014-03-4
题目链接:http://118.190.20.162/view.page?gpid=T7#include <iostream>#include <algorithm>#include <stdlib.h>#include <stdio.h>#include <queue>#define ll long longusin...
2019-08-08 11:23:43 244
原创 [CCF CSP]公共钥匙盒2017-09-2
题目链接:http://118.190.20.162/view.page?gpid=T62#include <iostream>#include <stdio.h>#include <algorithm>using namespace std;const int maxn=1000;int n,k;struct node{ int...
2019-08-06 21:49:59 163
原创 [CCF CSP]行车路线2017-12-4
题目链接:http://118.190.20.162/view.page?gpid=T65#include <iostream>#include <stdio.h>#include <queue>#include <memory.h>using namespace std;const int inf=0x3f3f3f;long l...
2019-08-06 21:38:08 190
原创 [CCF CSP]报数2017-12-2
题目链接:http://118.190.20.162/view.page?gpid=T67#include <iostream>#include <stdio.h>#include <queue>using namespace std;int main() { queue<int> q; int n,k; cin...
2019-08-06 17:27:16 544
原创 [CCF CSP]棋局评估2018-03-4
题目链接:http://118.190.20.162/view.page?gpid=T70#include <stdio.h>#include <iostream>#include <stdlib.h>using namespace std;int T;int map[4][4];int Judge(){ for(int i=0;i&l...
2019-08-06 17:23:25 415
原创 [CCF CSP]碰撞的小球2018-03-2
题目链接:http://118.190.20.162/view.page?gpid=T72#include <iostream>#include <stdio.h>#include <stdlib.h>#include <memory.h>using namespace std;int n,L,t;bool run_directio...
2019-08-06 15:31:07 129
原创 [CCF CSP]再卖菜2018-09-4
题目链接:http://118.190.20.162/view.page?gpid=T76#include<iostream>using namespace std;int t,a[400],b[400];bool f[301][301][301];void dfs(int n){ if(f[n][b[n-1]][b[n-2]])return; f[n]...
2019-08-06 15:07:48 226
原创 [CCF CSP]买菜2018-09-2
题目链接:http://118.190.20.162/view.page?gpid=T78#include <iostream>#include <stdio.h>#include <memory.h>using namespace std;const int maxn=2000+10;int vis[1000000+10];int n;i...
2019-08-06 12:01:39 210
原创 [CCF CSP]数据中心2018-12-4
题目链接:http://118.190.20.162/view.page?gpid=T83#include <iostream>#include <algorithm>using namespace std;const int N=5*100000+10;int father[N];struct node{ int u,v; int weig...
2019-08-06 11:42:21 232
原创 [CCF CSP]小明放学2018-12-2
题目链接:http://118.190.20.162/view.page?gpid=T81#include <iostream>#include <algorithm>#include <stdio.h>using namespace std;long long sum=0;int r,y,g;int n;int main(){ ci...
2019-08-06 11:05:49 272
原创 [CCF CSP]消息传递接口2019-3-4
题目链接:http://118.190.20.162/view.page?gpid=T86#include <iostream>#include <stdlib.h>#include <string>#include <vector>#include <memory.h>using namespace std;int T...
2019-08-06 01:27:54 607
原创 [CCF CSP]集合竞价2014-12-3
题目链接:http://118.190.20.162/view.page?gpid=T19#include <iostream>#include <stdio.h>#include <stdlib.h>#include <algorithm>#include <set>using namespace std;struct...
2019-08-05 23:28:47 512
原创 [CCF CSP]二十四点2019-3-2
题目链接:http://118.190.20.162/view.page?gpid=T88思路:后缀表达式求值#include <iostream>#include <stdio.h>#include <stdlib.h>#include <stack>#include <queue>#include <map&...
2019-08-05 23:25:44 232
原创 [CCF CSP]字符串匹配2014-9-3
题目链接:http://118.190.20.162/view.page?gpid=T14#include <iostream>#include <stdio.h>#include <stdlib.h>using namespace std;string q[101];int res[101];int pos;int main() { ...
2019-08-05 19:58:00 152
原创 [CCF CSP]命令行选项2014-3-3
题目链接:http://118.190.20.162/view.page?gpid=T8思路:模拟#include <iostream>#include <algorithm>#include <stdio.h>#include <vector>#include <map>#include <set>us...
2019-08-05 19:54:42 220
原创 [CCF CSP]Markdown2017-3-3
题目链接:http://118.190.20.162/submitlist.page?gpid=T55思路:按题意模拟- .-没找到哪里错了,只有80分#include <iostream>#include <stdio.h>#include <stdlib.h>#include <sstream>using namespace...
2019-08-05 19:52:40 179
原创 [CCF CSP]损坏的RAID52019-3-3
题目链接:http://118.190.20.162/view.page?gpid=T87思路: 给定查询块的编号后,结合阵列中硬盘的数目和条带大小计算出块所在的硬盘号以及在该硬盘的位置,然后直接取数据就可以.如果找到的是数据缺失的硬盘,则使用其他硬盘的异或值算出即可.#include <iostream>#include <algorithm>#inc...
2019-08-05 19:48:54 218
原创 [CCF CSP]消除类游戏2015-12-2
题目链接:http://118.190.20.162/view.page?gpid=T36思路:从每个点的四个方向寻找相同的棋子,记录下来.#include <iostream>#include <algorithm>#include <stdlib.h>#include <stdio.h>using namespace std;...
2019-08-05 19:41:51 108
原创 [CCF CSP]送货2015-12-4
题目链接:http://118.190.20.162/view.page?gpid=T34思路: 1.DFS判断图的连通性 2.无向图判定欧拉路径定理 3.DFS序找欧拉路径#include <iostream>#include <algorithm>#include <vector>#include <stack>#in...
2019-08-05 19:37:52 138
原创 [CCF CSP]画图2015-12-3
题目链接:http://118.190.20.162/view.page?gpid=T35思路:简单的DFS+模拟就可以了#include <iostream>#include <algorithm>#include <stdio.h>#include <map>#include <memory.h>using nam...
2019-08-05 19:31:27 240
原创 [CCF CSP] Corntab 201712-3
试题地址:http://118.190.20.162/view.page?gpid=T66方法挺笨的,但是简单易懂,一次AC.#include <iostream>#include <stdio.h>#include <algorithm>#include <map>#include <stdlib.h>#includ...
2019-08-04 22:18:52 156
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人