自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 【数据挖掘】之 数据挖掘 绪论

1.什么是数据挖掘数据挖掘是在大型数据存储库中,自动地发现有用信息的过程。数据挖掘技术用来探查大型数据库,发现先前未知的有用模式。数据挖掘还可以预测未来观测结果。并非所有的信息发现任务都被视为数据挖掘。例如,使用数据库管理系统查找个别的记录,或通过因特网的搜索引擎查找特定的Web页面,则是信息检索(information retrieval)领域的任务。虽然这些任务非常重要,可能涉及使...

2020-04-28 23:35:42 34469

原创 【Python爬虫】之 抓取“微医”上的医生信息

1.爬虫设计本文用Python语言实现网络爬虫抓取特定数据,使用Beautiful Soup进行HTML的解析。Beautiful Soup是一个HTML/XML解析器,主要功能是解析和提取HTML/XML中的数据,提取数据时,类似于正则表达式的功能。Beautiful Soup将整个文档载入,解析整个DOM树,其时空开销都比较大,性能不如lxml。Beautiful Soup为不同的解析器提...

2020-04-27 22:51:39 41129 4

原创 【数据挖掘】之 支持向量机

1.支持向量机简介在机器学习中,支持向量机是一种监督学习模型和相关的学习算法,SVM用于分析分类和回归分析中的数据。给定一组训练数据,每个训练实例被标记为属于两个类别中的一个或另一个,SVM训练算法创建一个模型,将新数据分配给两个类别之一,使其成为非概率二元线性分类器。SVM模型将数据表示为空间中的点,使得映射将各个类别的数据被尽可能宽的间隔分开。然后,将新数据映射到同一空间,并根据它们所处的...

2020-04-27 22:04:40 34281

原创 【NLP】之 Word2vec(将评论转为词向量)

1.Word2vec简介Word2vec,为一些用来产生词向量的有关模型。这些模型是浅层的神经网络,经过训练可以重新建立语言文本。网络用文字表示,有必要猜测相邻位置的输入字。训练完成后,word2vec模型可用于将每个单词映射到矢量,该矢量可用于表示单词和单词之间的关系。该向量为神经网络之隐藏层。总之,word2vec使用一层神经网络将one-hot 形式的单词向量映射到分布式形式的单词向...

2020-04-26 22:25:47 39749 5

原创 【NLP】之 结巴分词

1.结巴分词简介结巴分词是当前效果较好的一种中文分词器,支持中文简体、中文繁体分词,同时还支持自定义词库。结巴分词支持三种分词模式:精确模式、全模式和搜索引擎模式。精确模式是试图将句子最精确的进行切分,适合用于文本分析; 全模式的原理是把句子中全部可以成词的词语全部扫描出来,它的分词速度快,缺点是无法识别歧义词句; 搜索引擎模式是在精确模式的基础上进一步处理的,它对较长的词语再进...

2020-04-26 22:25:43 45231 1

原创 【爬虫】之 反爬与反反爬

常见反爬技术1.数据头Headers “User-Agent“反爬虫机制解析,用来判断是否是浏览器访问。 2.根据IP访问频率来封禁IP。 3.访问次数过多,弹出验证码、拼图等验证方式。 4.动态返回数据(ajax、json)。 5.在响应数据页面之前,先返回一段带有JavaScript 代码的页面,用于验证访问者有无 JavaScript 的执行环境,以确定使用的是不是浏览器。...

2020-04-25 23:46:06 34639

原创 SPOJ - TEAM2 A Famous ICPC Team

DescriptionMr. B, Mr. G, Mr. M and their coach Professor S are planning their way to Warsaw for the ACM-ICPC World Finals. Each of the four has a square-shaped suitcase with side length Ai(1 <=...

2020-04-22 14:16:22 33315

原创 计蒜客 - T1125 判断字符串是否为回文

Description输入一个字符串,输出该字符串是否回文。回文是指顺读和倒读都一样的字符串。输入格式输入为一行字符串(字符串中没有空白字符,字符串长度不超过100100)。输出格式如果字符串是回文,输出"yes";否则,输出"no"。输出时每行末尾的多余空格,不影响答案正确性样例输入abcdedcba样例输出yes#incl...

2020-04-22 14:16:13 33540

原创 UVA - 815 Flooded!

DescriptionInputOutputSample InputSample Output#include <iostream>#include <cstdio>#include <algorithm>using namespace std;int a[1000];int main...

2020-04-22 14:16:04 33279

原创 UVA - 725 Division 【暴力枚举】

Description#include <stdio.h>#include <string.h>int vd[10];bool check(int a, int b){ int x; if (a < 10000 || b < 10000) vd[0] = 1; while (a){ ...

2020-04-22 14:15:55 33386

原创 UVA - 712 S-Trees

Description#include <iostream>#include <cstdio>#include <cstring>using namespace std;char s[10000], a[10000];int ans[10000];int main() { int n, m, cnt ...

2020-04-21 20:39:45 33259

原创 ZOJ - 1107 FatMouse and Cheese 【DP记忆化搜索】【DFS】

DescriptionFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. A...

2020-04-21 20:39:39 32300

原创 UVA - 673 Parentheses Balance 【栈】

Description#include <iostream>#include <cstdio>#include <stack>#include <cstring>using namespace std;int main(){ char str[150]; int n, len, flag; sc...

2020-04-21 20:39:34 33019

原创 UVA - 536 Tree Recovery

Description#include <cstdio>#include <cstring>using namespace std;void postorder(int len, char *pr, char *in, char *po){ if(len <= 0) return ; int p, i;...

2020-04-21 20:37:43 33457

原创 UVA - 524 Prime Ring Problem

Description#include <cstdio>#include <cmath>using namespace std;int n, t = 0;int a[100] = {0};int vis[50] = {0};//是否被使用过的标志int isp[100] = {0};int is_prime(int x){ int ...

2020-04-21 20:37:36 33408

原创 UVA - 514 Rails

Description#include <cstdio>using namespace std;int a[1005] = {0}, b[1005] = {0};int main() { int i, j, k, n; while(scanf("%d", &n) && n) { while(sc...

2020-04-21 20:37:29 33247

原创 UVA - 489 Hangman Judge 【模拟】

Description#include <iostream>#include <cstdio>#include <cstring>using namespace std;int main() { char str[100],s[100]; int t; int lenstr, lens; ...

2020-04-21 20:37:23 33288

原创 OpenJ_Bailian - 4070 全排列

Description对于数组[1, 2, 3],他们按照从小到大的全排列是1 2 31 3 22 1 32 3 13 1 23 2 1现在给你一个正整数n,n小于8,输出数组[1, 2,…,n]的从小到大的全排列。Input输入有多行,每行一个整数。当输入0时结束输入。Output对于每组输入,输出该组的全排列。每一行是一种可能的排列,...

2020-04-21 20:37:17 33749

原创 OpenJ_Bailian - 4013 中位数

Description中位数定义:一组数据按从小到大的顺序依次排列,处在中间位置的一个数或最中间两个数据的平均值(如果这组数的个数为奇数,则中位数为位于中间位置的那个数;如果这组数的个数为偶数,则中位数是位于中间位置的两个数的平均值).给出一组无序整数,求出中位数,如果求最中间两个数的平均数,向下取整即可(不需要使用浮点数)Input该程序包含多组测试数据,每一组测试数据的第一...

2020-04-21 20:37:09 33367

原创 OpenJ_Bailian - 3708 1的个数 【进制转换】

Description给定一个十进制整数N,求其对应2进制数中1的个数Input第一个整数表示有N组测试数据,其后N行是对应的测试数据,每行为一个整数。OutputN行,每行输出对应一个输入。Sample Input42100100066Sample Output1362#include <stdio.h>...

2020-04-21 20:37:04 33431

原创 POJ - 3630 Phone List

DescriptionGiven a list of phone numbers, determine if it is consistent in the sense that no number is the prefix of another. Let's say the phone catalogue listed these numbers:Emergency 911 Ali...

2020-04-20 21:26:22 33399

原创 UVA - 272 TEX Quotes

Description#include <iostream>#include <cstdio>#include <cstring>using namespace std;int main(){ char c; int q=1; while((c=getchar())!=EOF) { ...

2020-04-20 21:25:59 33477

原创 UVALive - 2651 ISBN

#include <stdio.h>#include <string.h>char s[20];int main(){ int last; int w; int sum; while (~scanf("%s", s)){ w = 10; sum = 0; ...

2020-04-20 21:25:54 33351

原创 Longge's problem POJ - 2480

DescriptionLongge is good at mathematics and he likes to think about hard mathematical problems which will be solved by some graceful algorithms. Now a problem comes: Given an integer N(1 < N &l...

2020-04-20 21:25:50 33528

原创 POJ - 2406 Power Strings

DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponentia...

2020-04-20 21:25:45 33528

原创 UVA - 232 Crossword Answers

Description#include <cstdio>#include <cstring>#include<ctype.h>struct As{ int x,y; int Num;}A[400];struct Dn{ int x,y; int Num;}D[400];...

2020-04-20 21:25:40 33351

原创 UVA - 227 Puzzle

DescriptionA children’s puzzle that was popular 30 years ago consisted of a 5×5 frame which contained 24 small squares of equal size. A unique letter of the alphabet was printed on each small squar...

2020-04-20 21:24:27 33390

原创 HYSBZ - 2208 连通数

DescriptionInput输入数据第一行是图顶点的数量,一个正整数N。 接下来N行,每行N个字符。第i行第j列的1表示顶点i到j有边,0则表示无边。Output输出一行一个整数,表示该图的连通数。Sample Input3 010 001 100Sample Output9Hint对于100%的数据,N不超过2000。#i...

2020-04-20 21:24:21 33513

原创 POJ - 2115 C Looooops 【扩展欧几里得】

DescriptionA Compiler Mystery: We are given a C-language style for loop of typefor (variable = A; variable != B; variable += C) statement;I.e., a loop which starts by setting variable to va...

2020-04-20 21:24:14 33604

原创 ZOJ - 2109 FatMouse' Trade 【贪心】【背包】

DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room contains J[i]...

2020-04-20 21:24:09 33251

原创 FZU - 2020 组合

Description给出组合数C(n,m), 表示从n个元素中选出m个元素的方案数。例如C(5,2) = 10, C(4,2) = 6.可是当n,m比较大的时候,C(n,m)很大!于是xiaobo希望你输出 C(n,m) mod p的值!Input输入数据第一行是一个正整数T,表示数据组数 (T <= 100) 接下来是T组数据,每组数据有3个正整数 n, m, p (1...

2020-04-19 21:29:39 33316

原创 ZOJ - 1906 Relatives 【欧拉函数】

DescriptionGiven n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if there are no integers x > 1, y > 0, z &g...

2020-04-19 21:29:37 32986

原创 HihoCoder - 1704 循环数组

Description给定包含N个整数的数组A1, A2, ... AN,你可以选择任意一个Ai,将Ai旋转到数组第一项,即将数组变成:Ai, Ai+1, Ai+2, ... AN, A1, A2, ..., Ai-1现在小Hi希望旋转之后的数组满足:对于任意K(1 ≤ i ≤ N),前K项的和都是正数。 例如对于A=[3, -5, 2, -2, 3, 0],旋转成[3...

2020-04-19 21:29:16 32034

原创 UVA - 1640 The Counting Problem

DescriptionGiven two integers a and b, we write the numbers between a and b, inclusive, in a list. Your task is to calculate the number of occurrences of each digit. For example, if a = 1024 and b ...

2020-04-19 21:29:12 32273

原创 UVA - 1589 Xiangqi

DescriptionInputThe input contains no more than 40 test cases. For each test case, the first line contains three integers representing the number of red pieces N (2 ≤ N ≤ 7) and the positio...

2020-04-19 21:29:08 31992

原创 UVA - 1587 Box

DescriptionInputInput file contains several test cases. Each of them consists of six lines. Each line describes one pallet and contains two integer numbers w and h (1 ≤ w, h ≤ 10 000) — width...

2020-04-19 21:29:04 31844

原创 UVA - 1586 Molar mass 【字符串处理】

DescriptionInputYour program is to read from standard input. The input consists of T test cases. The number of test cases T is given in the first line of the input. Each test case is given in...

2020-04-19 21:28:56 32201

原创 UVA - 1584 Circular Sequence

DescriptionSome DNA sequences exist in circular forms as in the following figure, which shows a circular sequence “CGAGTCAGCT”, that is, the last symbol “T” in “CGAGTCAGCT” is connected to the firs...

2020-04-19 21:28:52 32203

原创 UVA - 1585 Score

DescriptionThere is an objective test result such as “OOXXOXXOOO”. An ‘O’ means a correct answer of a problem and an ‘X’ means a wrong answer. The score of each problem of this test is calculated b...

2020-04-19 21:28:47 32246

原创 HRBUST - 1569 比赛排名

Description有n个同学参加了一场比赛,每个同学都有一个确定的名字。并且每个人都一个得分,但可能由于一些犯规导致扣分,所以最终的实际得分为总得分减去犯规扣分。如一个人得分为100,扣分为10,那么实际得分为90。现在需要你来为这n个人确定比赛排名。Input第一行是一个整数t(t<=20),代表t组测试数据,接下来有t组测试数据。对于每组测试数据,第...

2020-04-19 21:28:44 32377

空空如也

空空如也

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

TA关注的人

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