自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 资源 (1)
  • 收藏
  • 关注

原创 关于Python的nltk

有关Python的nltk库的安装使用问题利用nltk做词性辨析遇到问题:第一步下载文件 可以去官网下载 http://www.nltk.org/nltk_data/可以去下载我上传的

2021-11-04 11:01:24 182

原创 Manacher(马拉车)

作为一个计算机科学技术学院的大学生,在决定自己要跟着走学校举办的ACM时,Manacher可以说是第一个比较用心研究的算法了,在这之前和一位学姐聊天,发现不知不觉都大二了,有些东西是时候该学学了,好了话不多说,开始我们今天的正题 ————马拉车这个马拉车算法 Manacher‘s Algorithm 是用来查找一个字符串的最长回文子串的线性方法,由一个叫 Manacher 的人在 1975 年发明的,这个方法的最大贡献是在于将时间复杂度提升到了线性,这是非常了不起的。对于回文串想必大家都不陌生,就是正读反

2020-07-27 19:22:10 184

转载 Tian Ji -- The Horse Racing

Problem DescriptionHere is a famous story in Chinese history.“That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and ot...

2020-03-24 22:20:22 291

转载 今年暑假不AC

Problem Description“今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%…”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超级女生,以及王小...

2020-03-23 22:43:58 84

转载 Number Sequence

Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n).InputThe input ...

2020-03-22 19:35:48 125

原创 Fibonacci Again

Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequence of lines, each containing an integer n. (n &l...

2020-03-21 18:50:09 104 1

原创 人见人爱A^B

Problem Description求A^B的最后三位数表示的整数。说明:A^B的含义是“A的B次方”Input输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0,则表示输入数据的结束,不做处理。Output对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。Sample Input2 ...

2020-03-20 17:13:43 82

原创 实验7-1-8-一维数组 输出数组元素 (15分)

本题要求编写程序,对顺序读入的n个整数,顺次计算后项减前项之差,并按每行三个元素的格式输出结果。输入格式:输入的第一行给出正整数n(1<n≤10)。随后一行给出n个整数,其间以空格分隔。输出格式:顺次计算后项减前项之差,并按每行三个元素的格式输出结果。数字间空一格,行末不得有多余空格。输入样例:105 1 7 14 6 36 4 28 50 100输出样例:-4 6 7-...

2020-03-20 14:27:22 2925

原创 实验7-1-7-一维数组 查找整数 (10分)

本题要求从输入的N个整数中查找给定的X。如果找到,输出X的位置(从0开始数);如果没有找到,输出“Not Found”。输入格式:输入在第一行中给出两个正整数N(≤20)和X,第二行给出N个整数。数字均不超过长整型,其间以空格分隔。输出格式:在一行中输出X的位置,或者“Not Found”。输入样例1:5 73 5 7 1 9输出样例1:2输入样例2:5 73 5 8 1 ...

2020-03-19 19:27:13 4693 1

原创 实验7-1-6-一维数组 求一批整数中出现最多的个位数字 (20分)

给定一批整数,分析每个整数的每一位数字,求出现次数最多的个位数字。例如给定3个整数1234、2345、3456,其中出现最多次数的数字是3和4,均出现了3次。输入格式:输入在第1行中给出正整数N(≤1000),在第二行中给出N个不超过整型范围的非负整数,数字间以空格分隔。输出格式:在一行中按格式“M: n1 n2 …”输出,其中M是最大次数,n1、n2、……为出现次数最多的个位数字,按从小...

2020-03-19 19:05:53 1011

原创 Rightmost Digit

Problem DescriptionGiven a positive integer N, you should output the most right digit of N^N.InputThe input contains several test cases. The first line of the input is a single integer T which is t...

2020-03-19 18:49:10 99

原创 最小公倍数

Problem Description给定两个正整数,计算这两个数的最小公倍数。Input输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sample Output70我采用的是 利用gcd函数来回归最大公倍数,最大公倍数 = 俩个数相乘除以最大公...

2020-03-18 14:49:14 386

原创 Elevator

Problem Description The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified o...

2020-03-17 13:21:53 109

原创 Sum Problem

Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + … + n.Input The input will consist of a series of in...

2020-03-16 18:48:56 99 1

原创 Uniform Generator

Problem Description Computer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed(x+1) = [seed(x) + STEP] % MODwhere ‘%’ is the modul...

2020-03-14 21:09:44 143

原创 Digital Roots

Total Submission(s) : 36 Accepted Submission(s) : 10Problem Description The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digi...

2020-03-13 13:35:23 76

原创 Big Number

Problem Description In many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are g...

2020-03-13 13:13:04 70

原创 The Hardest Problem Ever

Problem Description Julius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive, he decided to create one of th...

2020-03-12 20:39:29 199

原创 A+B for Input-Output Practice (VII)

Problem Description Your task is to Calculate a + b. Input The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line. Output Fo...

2020-03-12 10:24:55 249

原创 A+B for Input-Output Practice (VI)

Problem Description Your task is to calculate the sum of some integers.Input Input contains multiple test cases, and one case one line. Each case starts with an integer N, and then N integers follow ...

2020-03-11 10:31:15 64

原创 A+B for Input-Output Practice (V)

Total Submission(s) : 6 Accepted Submission(s) : 6Problem Description Your task is to calculate the sum of some integers.Input Input contains an integer N in the first line, and then N lines follo...

2020-03-11 08:29:49 251

原创 A+B for Input-Output Practice (IV)

Problem Description Your task is to Calculate the sum of some integers.Input Input contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A te...

2020-03-10 15:31:17 392

原创 A+B for Input-Output Practice (III)

Problem Description Your task is to Calculate a + b.Input Input contains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case containing...

2020-03-10 14:54:55 447

原创 A+B for Input-Output Practice (II)

Problem Description Your task is to Calculate a + b.Input Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a spac...

2020-03-09 20:08:32 676

原创 a+b

Problem Description Your task is to Calculate a + b.Too easy?! Of course! I specially designed the problem for acm beginners.You must have found that some problems have the same titles with this one...

2020-03-09 20:05:09 461

nltk_data.zip

Python nltk需要的文件

2021-11-04

空空如也

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

TA关注的人

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