- 博客(89)
- 资源 (1)
- 收藏
- 关注
转载 解朴素贝叶斯分类算法
1、我们这么想,假如没有这个假设,那么我们对右边这些概率的估计其实是不可做的,这么说,我们这个例子有4个特征,其中帅包括{帅,不帅},性格包括{不好,好,爆好},身高包括{高,矮,中},上进包括{不上进,上进},那么我只要求得p(不帅、性格不好、身高矮、不上进|嫁)、p(不帅、性格不好、身高矮、不上进)、p(嫁)即可,好的,下面我分别求出这几个概率,最后一比,就得到最终结果。p (不嫁|不帅、性格不好、身高矮、不上进) = ((1/6*1/2*1*1/2)*1/2)/(1/3*1/3*7/12*1/3)
2023-03-24 17:45:27 87
原创 已知后序和中序遍历输出先序遍历
输入:第一行给出正整数N(≤30),是树中结点的个数。随后两行,每行给出N个整数,分别对应后序遍历和中序遍历结果,数字间以空格分隔。题目保证输入正确对应一棵二叉树。输出:先序遍历结果#include<bits/stdc++.h>using namespace std;const int maxn=1e5+5;int pre[31],l=0;void change(in...
2019-02-20 15:27:13 886
原创 mmc学长的情书
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=7#include <stdio.h>#include <string.h>char str[1005];long long sum=0;int main(){ gets(str); for(int i=0;i<strlen(...
2018-12-31 15:25:02 455 1
原创 学习是不可能学习的
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=11#include<stdio.h>const int MAX = 1010;struct student{ char Name[30]; int Number;//学号 int Average;//平均分 int Add;//...
2018-12-31 15:24:53 883 1
原创 wpb学长上楼梯
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=8#include<iostream>#include<math.h>#include<algorithm>#include<cstring>#include<queue>long long n;using...
2018-12-31 15:24:44 1089
原创 zy学长的花呗账单
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=4#include <iostream>#include <stdio.h>#include <string.h>#include <math.h>//#include <map>//#include <...
2018-12-31 15:24:32 395
原创 luerの切割
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=6#include <iostream>#include <cstring>#include <algorithm>#include <string>#include <cstdio>#include <...
2018-12-31 15:24:16 168
原创 Xylon学长的压缩文件
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=9#include<iostream>#include<string>using namespace std; int main(){ int n,i,num; string a; cin>>n; while(n--) {...
2018-12-31 15:24:07 507
原创 上一道题比这道难吧
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=2#include <bits/stdc++.h>using namespace std;#define LL long longint main(){ LL a, b, n; while (cin >> a >> b >&g...
2018-12-31 15:23:57 167
原创 cyt の heart
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=10#include <iostream>#include <cstring>#include <cstdio>#include <string>using namespace std;char map[200][200]...
2018-12-31 15:23:47 345 3
原创 画个圈圈诅咒你
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=5#include <bits/stdc++.h>using namespace std;const int maxn = 2e1 + 5;char Graph[maxn][maxn];void Fractal(int N, int X, int Y) ...
2018-12-31 15:23:36 2551
原创 邮局之路
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=1#problem-anchor#include<bits/stdc++.h>using namespace std;#define ll long long//d, k, a, b, tll d, k, a, b, t;int main(){ ...
2018-12-31 15:22:59 491
原创 mmc学长的作文
题目链接:http://acm.henu.edu.cn/contest/problem?id=2&pid=3#include<bits/stdc++.h>using namespace std;string s="";string ss[50000];int l=0;void init(){ string x=""; for(int i=0;i...
2018-12-09 22:12:00 275
原创 A+B Problem
#include <stdio.h>int main(){ int a, b; scanf("%d %d", &a, &b); printf("%d\n", a + b); return 0;}
2018-12-09 22:08:30 123
原创 !单身夜大作战 !
题目链接:http://henummc.top/problem.php?cid=1001&pid=10#include<bits/stdc++.h> using namespace std;struct stu{ int v; int w;}a[10005];bool cmp(stu x,stu y){ if(x.v==y.v){ ...
2018-11-11 20:50:17 313
原创 百度云密码
题目链接:http://henummc.top/problem.php?cid=1001&pid=9#include<bits/stdc++.h>#include<iostream>#include<stdlib.h>using namespace std;char s1[405], s2[405];int a[405],b[405];...
2018-11-11 20:48:54 7369
原创 忘了...
题目链接:http://henummc.top/problem.php?cid=1001&pid=8#include<bits/stdc++.h>#include<iostream>#include<stdlib.h>//包含了所有C++头文件的头文件using namespace std;using namespace std;int ...
2018-11-11 20:47:57 162
原创 数的递推
题目链接:http://henummc.top/problem.php?cid=1001&pid=7#include<iostream>using namespace std;int a[1001];int main(){ int n; cin>>n; a[0] = 0; a[1] = 1; a[2] = 2;...
2018-11-11 20:46:55 218
原创 yll学姐的运动世界校园
题目链接:http://henummc.top/problem.php?cid=1001&pid=6#include<bits/stdc++.h>#include<iostream>#include<stdlib.h>//包含了所有C++头文件的头文件using namespace std;int main(){ //freope...
2018-11-11 20:45:56 1521
原创 世豪大佬的聚会
题目链接:http://henummc.top/problem.php?cid=1001&pid=5#include<stdio.h>int a[2050];int main(){ int n,i,t,j,f; scanf("%d",&t); while(t--) { scanf("%d",&n); ...
2018-11-11 20:44:55 205
原创 mmc的英语作文
题目链接:http://henummc.top/problem.php?cid=1001&pid=2#include<bits/stdc++.h>using namespace std;string s="I say to you today, my friends.And so even though we face the difficulties of toda...
2018-11-11 20:43:45 268
原创 Xylon学长的小卖部
题目链接:http://henummc.top/problem.php?cid=1001&pid=1#include<iostream>#include<string>using namespace std; //yi er san si wu liu qi ba jiu shi int flag; //标志每次判断字符串所代表数字的起始...
2018-11-11 20:42:42 280
原创 cyt的口红
题目链接:http://henummc.top/problem.php?cid=1001&pid=0#include<cstdio>#include<cstdlib>#include<iostream>#include<vector>#include<cstring>#include<algorithm>...
2018-11-11 20:41:12 356
原创 poj 2761 Feed the dogs 划分树
Feed the dogsTime Limit: 6000MS Memory Limit: 65536K Total Submissions: 22814 Accepted: 7233 DescriptionWind loves pretty dogs very much, and she has n pet dogs. So Jiajia has ...
2018-11-08 17:24:22 132
转载 划分树模板--by kuangbin模板
#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>#include<cctype>using namespace std;const int MAXN = 100010;int tree[2...
2018-11-08 17:23:24 150
原创 HYSBZ - 1588 Treap
1588: [HNOI2002]营业额统计Time Limit: 5 Sec Memory Limit: 162 MBSubmit: 19665 Solved: 8365[Submit][Status][Discuss]Description营业额统计 Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况。 Tiger拿出了...
2018-11-06 21:46:43 132
原创 Treap模板
#include<cstdio>#include<iostream>#include<cmath>#include<cstring>#include<algorithm>#include<cctype>using namespace std;typedef long long ll;const int ...
2018-11-06 21:45:23 162
原创 搭建hustoh oj
第一步:wget https://raw.githubusercontent.com/zhblue/hustoj/master/trunk/install/install-ubuntu16+.sh第二步:sudo bash install-ubuntu16+.sh
2018-10-25 19:48:04 147
原创 POJ 1330 Nearest Common Ancestors LAC
Nearest Common AncestorsTime Limit: 1000MS Memory Limit: 10000K Total Submissions: 35020 Accepted: 17733 DescriptionA rooted tree is a well-known data structure in computer sci...
2018-10-12 13:17:44 93
原创 HDU 2586 Dijkstra 算法 + 堆优化
How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23772 Accepted Submission(s): 9465 Problem DescriptionThere are n house...
2018-09-04 14:08:29 101
原创 HihoCoder 1062 map+set
描述小Ho最近发现了一个神奇的网站!虽然还不够像58同城那样神奇,但这个网站仍然让小Ho乐在其中,但这是为什么呢?“为什么呢?”小Hi如是问道,在他的观察中小Ho已经沉迷这个网站一周之久了,甚至连他心爱的树玩具都弃置一边。“嘿嘿,小Hi,你快过来看!”小Ho招呼道。“你看,在这个对话框里输入我的名字,在另一个对话框里,输入你的名字,再点这个查询按钮,就可以查出来……什么!我们居然有...
2018-09-03 22:27:52 106
原创 最大流模板
最近学习了最大流虽然学的一般都是会简单的使用,一下是我用过的几个模板模板一sap:#include <bits/stdc++.h>/*用maze来存图*/typedef long long ll;using namespace std;const int MAXN=1100;int maze[MAXN][MAXN];int gap[MAXN],dis[MAXN...
2018-08-21 10:05:05 295
原创 UVA 10480 Sabotage 最大流
UVA 10480 - Sabotage (最大流)SabotageThe regime of a small but wealthy dictatorship has been abruptly overthrown by an unexpected rebellion. Because of the enormous disturbances this is causing in...
2018-08-21 09:41:00 119
原创 HDU 4280 Island Transport ISAP+bfs 初始化 + 栈优化
Island TransportTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 11917 Accepted Submission(s): 3802 Problem Description In the vast...
2018-08-20 21:23:33 189
原创 HDU 3746 Cyclic Nacklace KMP
Cyclic NacklaceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 14866 Accepted Submission(s): 6173 Problem DescriptionCC always become...
2018-08-15 10:49:55 127
原创 POJ 2406 Power Strings (KMP )
Power StringsTime Limit: 3000MS Memory Limit: 65536K Total Submissions: 58112 Accepted: 24140 DescriptionGiven two strings a and b we define a*b to be their concatenation. For ...
2018-08-15 10:48:30 106
原创 HDU 4848 Wow! Such Conquering! 深搜+强剪枝
Wow! Such Conquering!Time Limit: 15000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2556 Accepted Submission(s): 773 Problem DescriptionThere are n...
2018-08-13 14:34:30 153
原创 CodeForces - 873B 01串
B. Balanced Substringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string s consisting only of characters 0 and...
2018-08-09 08:16:11 216
原创 CodeForces - 1000C
C. Covered Points Counttime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given nn segments on a coordinate line; each endp...
2018-08-09 08:12:31 272
原创 POJ - 2785
4 Values whose Sum is 0Time Limit: 15000MS Memory Limit: 228000K Total Submissions: 29083 Accepted: 8820 Case Time Limit: 5000MS DescriptionThe SUM problem can be formulated ...
2018-08-09 08:10:00 126
算法艺术与信息学竞赛
2018-08-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人