自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2021-12-4-openGauss数据库源码学习-指标采集、预测与异常检测

opengauss源码解析指标采集、预测与异常检测代码位置:/gausskernel/dbmind/tools/anomaly_detection各模组在整体结构上的组合在摩天轮论坛上官方解析文章已经叙述的相对完整详尽。该报告对应为具体模块内部的实现。Agent模块代码位置: ~/agentAgent模块负责数据库指标数据采集与发送,从代码的结构上看,可以分为3个子模块,即DBSource(/db_source.py),MemoryChannel(/channel.py),HttpSink(/s

2021-12-04 18:38:54 1191

原创 2021-12-4-CentOs虚拟机下opengauss的配置使用

+++title = “CentOS虚拟机下openGauss的配置使用”date = “2021-12-04”tags = [“CentOS”, “openGauss”, “配置”]archives = “2021-12”author = “parker”summary = “个人配置openGauss的过程总结”+++实验环境说明虚拟机平台 VMware服务器端 CentOS 7.9本机系统 Windows 10部署版本 OpenGauss 1.1.0安装详细步骤虚拟机VMw

2021-12-04 17:40:20 1144

原创 Hdu1263 水果

      夏天来了~~好开心啊,呵呵,好多好多水果~~       Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了. Input第一行正整数N(0<N<=10)表示有N组测试数据. 每组测试数据的第一行是一个整数M(0<M<=100),表示工有M次成功的交易....

2018-07-16 16:52:55 229

原创 stl 的 优先队列

Because of the wrong status of the bicycle, Sempr begin to walk east to west every morning and walk back every evening. Walking may cause a little tired, so Sempr always play some games this time. Th...

2018-07-16 16:50:58 186

原创 POJ2635 The Embarrassed Cryptographer

The young and very promising cryptographer Odd Even has implemented the security module of a large system with thousands of users, which is now in use in his company. The cryptographic keys are create...

2018-07-16 16:06:43 180

原创 Hdu 1075

Ignatius is so lucky that he met a Martian yesterday. But he didn't know the language the Martians use. The Martian gives him a history book of Mars and a dictionary when it leaves. Now Ignatius want ...

2018-07-16 12:08:33 248

原创 Hdu1004 Let the balloon Rise

        Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they ...

2018-07-16 11:28:34 153

原创 丢手绢51Nod1875

基本就是圆桌问题,每次出去一个人,每次传E-1个人,其实是一样的,交了上次打表的程序#include<stdio.h> int main() { int a[15]={2,7,5,30,169,441,1872,7632,1740,93313,459901,1358657,2504881,13482720},k; while (1) { ...

2018-02-25 13:48:50 325

原创 通用版三C题map

水题,字符串匹配就好了.#include<cstdio>#include<map>#include<string>#include<string.h>#include<iostream>using namespace std;int main(){ char s[100]; char a[50],b[50]; ...

2018-02-25 11:35:32 218

原创 POJ3190 通用版三A题

挤牛奶,没反应过来,讲道理之前做优先队列的题就是为了做这道.题目大意为给定N个牛的操作时间,问最少需要几个操作室.按开始时间进行模拟即可\\#include<cstdio>#include<queue>#include<algorithm>#define N 1000010using namespace std;struct node{ in...

2018-02-24 21:01:02 249

原创 POJ1456(通用版二S题) 贪心

原本想用排序写,由于最近优先队列感觉很好用,就直接用了优先队列贪心策略和之前有一道补作业的题相似,取最大值往后向前安排即可》#include<cstdio>#include<queue>using namespace std;struct node{ int pro; int dead; bool operator<(const nod...

2018-02-24 16:43:35 198

原创 HDU 1022 栈(二X)

栈:http://blog.csdn.net/zhy_cheng/article/details/8090346模拟出栈入栈判断即可#include<cstdio>#include<stack>#include<iostream>using namespace std;int main(){    int n,ans[20];    char s1...

2018-02-23 13:52:38 177

原创 POJ2833 通用版二G题优先队列

去掉N1个高分和N2个低分求平均分的题目由于空间小用优先队列做了,比较水》。#include<cstdio>#include<queue>using namespace std;int main(){ int n1,n2,n; priority_queue<int>l,s; while (1) { int ...

2018-02-23 11:51:08 258

原创 POJ2051 Argus

老是交错语言..比扔石头还简单一点的优先队列#include<cstdio>#include<queue>using namespace std;struct node{ int id; int po; int le; bool operator<(const node &a) const { i...

2018-02-23 11:09:02 221

原创 HDU1896 Stones 优先队列

其实我只想做通用版三的第一题贪心。。然后就看到了优先队列,然后想起来这道题..第一次学习C++里的队列在此感谢http://blog.csdn.net/c20182030/article/details/70757660这一题目大意为由步数的奇偶性判断是否扔石头,然后计算最远石头到出发点的距离#include<cstdio>#include<queue>using na...

2018-02-22 20:51:54 257

原创 通用版五A题广搜

求由0和1组成的数K对于给定N满足K%N==0,原本看数据觉得搜索过不了,开了longlong结果还行#include<stdio.h>long long ans;int flag;void dfs(long long x,int n,int t){ if (flag) return; if (x%n==0) { printf("%lld...

2018-02-22 18:48:32 159

原创 POJ1611 并查集

读取数据进来归并即可,最后遍历一遍统计节点和0的节点相同的输出#include<stdio.h>#define N 30010int f[N];int find(int x){ if (f[x]==x) return x; else {f[x]=find(f[x]);return f[x];}}int main(){ int n,m; wh...

2018-02-22 16:50:09 183

原创 POJ2236 Wireless Network 并查集

Wireless NetworkTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 33412 Accepted: 13882DescriptionAn earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set ...

2018-02-22 16:06:56 169

转载 POJ1182 食物链(经典并查集)

之前做的并查集就是一般的归并集合,第一次做这个用相互关系(感觉和石头剪刀布一样)表示的并查集完全没有办法.关于此题的题解转载 :https://blog.csdn.net/c0de4fun/article/details/7318642(贼详细然而很罗嗦)http://blog.csdn.net/libing923/article/details/8240995/(感觉这个比较清楚,不过更新公式感...

2018-02-22 15:08:56 165

原创 通用版一S题

由天平称三次的结果来判断十二枚硬币中的1枚假币,分析:相等说明都是真币,up/down则增加其怀疑,记为1/-1;最后遍历输出怀疑度绝对值最高的#include<stdio.h>#include<string.h>int main(){ int n; scanf("%d\n",&n); while (n--) { ...

2018-02-21 16:12:18 352

原创 joseph

类似圆桌问题一样,给定人数K,K个好人在前,K个坏人在后,求步长M打了个表就交了#include<stdio.h>int main(){ int a[15]={2,7,5,30,169,441,1872,7632,1740,93313,459901,1358657,2504881,13482720},k; while (1) { scanf(...

2018-02-21 15:22:04 266

原创 通用版一U题

我真的是个zz,好好的水题因为把F打成D调了半小时。还心态爆炸地测试了题解后进行比对..不过我没找到题目有说多组数据#include<stdio.h>#include<string.h>int main(){ int m,t,u,f,d; char c; while (scanf("%d%d%d%d%d",&m,&t,&...

2018-02-21 14:44:33 312

原创 通用版W题

给定三点坐标求构成的圆的面积海伦公式s=sqrt(p(p-a)(p-b)(p-c)) p=(a+b+c)/2外接圆半径r=(abc)/4s#include<stdio.h>#include<math.h>#define pine 3.141592653589793int main(){ double x1,y1,x2,y2,x3,y3,r,s,p,a,b,...

2018-02-21 13:52:37 155

原创 通用版1V题

水题.按位数根据目标数的奇偶性递推即可#include<stdio.h>#include<string.h>int main(){ int t; scanf("%d",&t); while (t--) { int k,c=0,bit[65],i; long long n; char...

2018-02-21 13:26:40 170

原创 通用版二D题

高中物理...output limited exceed是用整型在读取...读题读题#include<stdio.h>#include<math.h>int main(){ double k,l,s,w; while (1) { double e; scanf("%lf%lf%lf%lf",&k,&amp...

2018-02-20 21:35:03 178

原创 HDU1004Let the Balloon Rise

题目写了stl的map然而我用C做了找到出现最多的气球颜色即可#include<stdio.h>#include<string.h>int main(){ int n; while (1) { int i,time[1001]={0},j,max=0,maxi; char s[1001][16]; scanf("%...

2018-02-20 20:27:31 176

原创 hdu2057 A+B again

十六进制a+b#include<stdio.h>int main(){ long long a,b; while (scanf("%llX %llX",&a,&b)!=EOF) { if (b+a>=0) printf("%llX\n",b+a); else printf("-%llX\n",(-b-a)); ...

2018-02-20 20:04:20 242

原创 POJ1745动归

根据N和K的范围开了dp[100005][100]的数组来表示DP[i][j]表示在进行了第I个数的操作后余数为J的情况是否存在顺序进行更新即可#include<stdio.h>#include<string.h>int dp[10005][105];int mod(int n,int k){ n=n%k; while (n<0) n+=k; retur...

2018-02-20 12:59:18 150

原创 UVA1594水题

觉得很难来着,随便写一个模拟的打算过不了就算,结果AC了,好像数据有点水?#include<stdio.h>#include<math.h>int main(){ int t; scanf("%d",&t); while (t--) { int n,i,a[20]={0},c=0,f=0; scanf("%d",&n); for (...

2018-02-20 12:34:49 279

原创 通用版四H题滑雪记忆化搜索

前几次WA没有考虑高度相等的地方. Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 6...

2018-02-19 17:02:41 175

原创 通用版四Q尺取法

Signals of most probably extra-terrestrial origin have been received and digitalized by The Aeronautic and Space Administration (that must be going through a defiant phase: "But I want to...

2018-02-19 16:07:13 245

转载 HYSBZ - 2456 A题找众数

我一开始用快排然后再找RE+ML?在此膜大神一开始看到这题还以为是个水题,结果发现内存限制竟然只有1MB!这就说明开不了数组了,思考良久后,还是有了个成型算法。看了下网上别人的算法,基本上和我想法一致 =_= 。那么这里我就额外解释一下。题目要求我们求出众数,那么众数就是出现次数最多的一个数。所以我们可以用抵消法,设一变量K,遇到一个与当前数不同的数就将K-1,反之+1,若K=0将答案更新为当前数...

2018-02-18 13:49:17 184

原创 通用版四N题并查集

wa:find函数写错了,在此贴出..#include<stdio.h>int father[50005];int find(int x){ if (father[x]!=x) father[x]=find(father[x]); else return father[x];}int main(){ long long cas=0; whi...

2018-02-18 13:13:31 195

原创 Bitset

转换进制水题#include<stdio.h>int main(){ long long n; int a[105]={0}; while (scanf("%lld",&n)!=EOF) { int count=0,i; if (n==0) {printf("0\n");continue;} while (n>0) {...

2018-02-18 12:25:00 158

原创 POJ2393 Yogurt factory贪心

仓库价格固定,只需比较前后两周的价格即可,上一周的价格+s与下一周的价格进行比较来决定策略#include<stdio.h>int main(){ int n,s,c[10005]={0},y[10005]={0},i; long long ans; scanf("%d%d",&n,&s); for (i=0;i<=n-1;i++) scanf("%d...

2018-02-18 12:15:20 196

原创 通用版二的U题 贪心

每次挑占用空间最大的来组合即可#include<stdio.h>#include<stdlib.h>int cmp(const void *a,const void *b){ return (*(int*)a)>(*(int*)b)?-1:1;}int main(){ int c=0,n,a[100005]={0},i,l,limit,r; scan...

2018-02-17 16:02:55 172

原创 HDU 1963 investment

多次完全背包顺着做下来就好#include<stdio.h>int max(int a,int b){ return a>b?a:b;}int main(){ int n,dp[100001],m,y,d,i,j,k,a[11],b[11]; scanf("%d",&n); while (n--) { scanf("%d%d",&amp...

2018-02-17 14:48:57 206

原创 HDU1215 情人节

看了一眼数据,打表233

2018-02-15 14:24:32 207

原创 HDU-1159 Common Subsequence最长公共子序列

DP水题,检测是否相同,相同则以前面的最大值更新即可#include<stdio.h>#include<string.h>int dp[1500][1500];int max(int x,int y){ if (x>y) return x;else return y;}int main(){ int i,j,n; char s1[...

2018-02-14 12:16:46 196

原创 POJ 3624 charm bracelet 01背包

水题#include<cstdio>#include<algorithm>int ma(int a,int b){ return a>b?a:b;}int main(){ int n,m,dp[13000]={0},i; scanf("%d%d",&n,&m); for (i=1;i<=n;i++) ...

2018-02-12 16:52:52 191

空空如也

空空如也

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

TA关注的人

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