自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 数据挖掘十大经典算法

国际权威的学术组织the IEEE International Conference on Data Mining (ICDM) 2006年12月评选出了数据挖掘领域的十大经典算法:C4.5, k-Means, SVM, Apriori, EM, PageRank, AdaBoost, kNN, Naive Bayes, and CART.不仅仅是选中的十大算法,其实参加评选的18

2015-01-16 09:44:00 1459

原创 [leetcode]258. Add Digits

258. Add DigitsGiven a non-negative integer num, repeatedly add all its digits until the result has only one digit.

2016-08-01 22:50:04 279

原创 [leetcode]344. Reverse String

344. Reverse String

2016-07-09 23:36:59 290

原创 [leetcode]345. Reverse Vowels of a String

345. Reverse Vowels of a String

2016-07-09 23:33:59 374

原创 [linux]Linux命令之ln

ln是linux中又一个非常重要命令,它的功能是为某一个文件在另外一个位置建立一个同步的链接.当我们需要在不同的目录,用到相同的文件时,我们不需要在每一个需要的目录下都放一个必须相同的文件,我们只要在某个固定的目录,放上该文件,然后在 其它的目录下用ln命令链接(link)它就可以,不必重复的占用磁盘空间。

2016-06-29 23:45:41 272

原创 [python]迭代器

迭代器是访问集合元素的一种方式。迭代器对象从集合的第一个元素开始访问,知道所有的元素被访问完结束。迭代器只能往前不会后退,不过这也没什么,因为人们很少在迭代途中往后退。

2016-06-15 23:39:56 313

原创 [python]生成器

生成器是python新引入的概念,由于历史原因,它也叫简单生成器。它和迭代器可能是近两年来引入的最强大的两个特性。但是,生成器的概念则要更高级一些。生成器可以帮助程序员写出非常优雅的代码。生成器是一种用普通的函数语法定义的迭代器。它的工作方式可以用例子来很好的展现,我们先看看怎么创建和使用生成器,然后再了解一下它的内部机制。

2016-06-14 23:58:27 465

原创 [python]循环中的else子句

当在循环内使用break语句时,通常是因为 “找到” 了某物或者因为某事 “发生” 了。在跳出时做一些事情是很简单的,比如 print (n) , 但是有些时候想要在没有跳出之前做些事情,那么怎么判断呢? 可以使用布尔变量,在循环前将其设定为False, 跳出后设定为True 。 然后再使用if 语句查看循环是否跳出了:broke_out = Falsefor x in set: d

2015-12-25 10:54:23 678

原创 [leetcode]110. Balanced Binary Tree

110. Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth

2015-12-24 20:08:51 292

原创 [python]python strip()方法

描述Python strip() 方法用于移除字符串头尾指定的字符(默认为空格)。函数原型声明:s为字符串,rm为要删除的字符序列s.strip(rm)        删除s字符串中开头、结尾处,位于 rm删除序列的字符s.lstrip(rm)       删除s字符串中开头处,位于 rm删除序列的字符s.rstrip

2015-12-21 21:01:52 645

原创 [sicily]1294. 高级机密

1294. 高级机密ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription       在很多情况下,我们需要对信息进行加密。特别是随着Internet的飞速发展,加密技术就显得尤为重要。       很早以前,罗马人为了在战争中传递信息,频繁地使用替换法进行信息加密。然而在计算机技术高速发展的今天,这种替

2015-11-12 12:37:02 460

原创 [sicily]1209. Sequence Sum Possibi

1209. Sequence Sum PossibiConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionMost positive integers may be written as a sum of a sequence of at least two consecutive positive

2015-11-12 09:19:39 260

原创 [sicily]1129. ISBN

1129. ISBNConstraintsTime Limit: 10 secs, Memory Limit: 32 MBDescriptionPractically every book that has been published during the past thirty years can be uniquely identified by its Internat

2015-11-10 12:33:58 251

原创 [sicily]1433. Optimal Parking

1433. Optimal ParkingConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionWhen shopping on Long Street, Michael usually parks his car at some random location, and then walks to t

2015-11-09 22:54:33 301

原创 [sicily]1438. Shopaholic

1438. ShopaholicConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionLindsay is a shopaholic. Whenever there is a discount of the kind where you can buy three items and only pay

2015-11-09 22:37:05 376

原创 [sicily]1686. Happy Children's Day

1686. Happy Children's DayConstraintsTime Limit: 5 secs, Memory Limit: 32 MBDescriptionChildren's Day is coming. In this day, children will get a lot of candies. In MAX city, people develop

2015-11-09 22:03:05 294

原创 [sicily]1935. 二叉树重建

1935. 二叉树重建ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription对于二叉树T,可以递归定义它的先序遍历、中序遍历和后序遍历如下: PreOrder(T)=T的根节点+PreOrder(T的左子树)+PreOrder(T的右子树) InOrder(T)=InOrder(T的左子树)+T的根

2015-11-07 12:15:49 891

原创 [sicily]1210. 二叉树

1210. 二叉树ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription在众多的数据结构中,二叉树是一种特殊而重要的结构,有着广泛的应用。二叉树或者是一个结点,或者有且仅有一个结点为二叉树的根,其余结点被分成两个互不相交的子集,一个作为左子集,另一个作为右子集,每个子集又是一个二叉树。遍历一棵二

2015-11-07 11:11:40 673

原创 [sicily]1509. Rails

1509. RailsConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThere is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in l

2015-11-01 19:03:51 317

原创 [sicily]1934. 移动小球

1934. 移动小球ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription你有一些小球,从左到右依次编号为1,2,3,...,n. 你可以执行两种指令(1或者2)。其中, 1 X Y表示把小球X移动到小球Y的左边, 2 X Y表示把小球X移动到小球Y右边。 指令保证合法,即X不等于Y。 例如,初始状

2015-11-01 18:36:44 279

原创 [sicily]1443. Printer Queue

1443. Printer QueueConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThe only printer in the computer science students' union is experiencing an extremely heavy workload. Some

2015-11-01 16:49:01 310

原创 [sicily]1931. 卡片游戏

1931. 卡片游戏ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription桌上有一叠牌,从第一张牌(即位于顶面的牌)开始从上往下依次编号为1~n。当至少还剩两张牌时进行以下操作:把第一张牌扔掉,然后把新的第一张放到整叠牌的最后。输入n,输出每次扔掉的牌,以及最后剩下的牌。 Input

2015-11-01 15:39:56 408

原创 [sicily]1486. 统计数字

1486. 统计数字ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription某次科研调查时得到了n个自然数,每个数均不超过1500000000(1.5*10^9)。已知不相同的数不超过10000个,现在需要统计这些自然数各自出现的次数,并按照自然数从小到大的顺序输出统计结果。Input

2015-11-01 10:16:22 550

原创 [sicily]1200. Stick

1200. StickConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription Anthony has collected a large amount of sticks for manufacturing chopsticks. In order to simplify his job, he wants t

2015-11-01 09:48:54 358

原创 [sicily]1052. Candy Sharing Game

1052. Candy Sharing GameConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionA number of students sit in a circle facing their teacher in the center. Each student initially has a

2015-11-01 09:35:27 290

原创 [sicily]1636. show me the money

1636. show me the moneyConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionFakosh like playing the game "StarCraft".  However, he is not so good at this game that he can't beat the

2015-10-25 13:28:55 529

原创 [sicily]1325. Digit Generator

1325. Digit GeneratorConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionFor a positive integer N , the digit-sum of N is defined as the sum of N itself and its digits. When

2015-10-25 13:01:16 365

原创 [sicily]1298. 数制转换

1298. 数制转换ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription有一种数制的基数是3,权值可以取-1,0,1,并分别用符号-,0,1表示,如这种数制的101表示十进制数的10,即1*(3^2)+0*(3^1)+1*(3^0)=10,又如这种数制的-0 表示十进制数的-3,即-1*(3^1)+0*(3^

2015-10-24 22:26:34 745

原创 [sicily]1561. PRIME

1561. PRIMEConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionA prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. The first

2015-10-24 21:16:20 322

原创 [sicily]1500. Prime Gap

1500. Prime GapConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThe sequence of n ? 1 consecutive composite numbers (positive integers that are not prime and not equal to

2015-10-24 13:10:54 459

原创 [sicily]1510. Mispelling

1510. MispellingConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionMisspelling is an art form that students seem to excel at. Write a program that removes the n th character fr

2015-10-23 21:36:29 320

原创 [sicily]1087. A Funny Game

1087. A Funny GameConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionAlice and Bob decide to play a funny game. At the beginning of the game they pick n(1 6) coins in a circle,

2015-10-23 21:22:01 337

原创 [sicily]1324. Score

1324. ScoreConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThere is an objective test result such as ``OOXXOXXOOO". An `O' means a correct answer of a problem and an `X'

2015-10-23 20:41:58 278

原创 [sicily]1388. Quicksum

1388. QuicksumConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the p

2015-10-23 20:34:20 560

原创 [sicily]1232. Electrical Outlets

1232. Electrical OutletsConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionRoy has just moved into a new apartment. Well, actually the apartment itself is not very new, even da

2015-10-23 20:16:38 238

原创 [sicily]1293. 3n+1数链问题

1293. 3n+1数链问题ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription在计算机科学上,有很多类问题是无法解决的,我们称之为不可解决问题。然而,在很多情况我们并不知道哪一类问题可以解决,那一类问题不可解决。现在我们就有这样一个问题,问题如下:1.       输入一个正整数n;2.      

2015-10-19 20:01:14 719

原创 [sicily]1817. 校歌手大奖赛

1817. 校歌手大奖赛ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription校歌手大奖赛中每个评委会给每个参赛选手打分,请用类描述每个选手的被评委的评分。选手得分规则为去掉一个最高分和一个最低分,然后计算平均得分,请编程输出某选手的得分。 Input输入数据有多组,第一行为

2015-10-19 19:47:49 315

原创 [sicily]1750. 运动会

1750. 运动会ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionZEH是一名04级的学生,他除了绩点高,还有运动细胞。有一次学院举办运动会,ZEH发现里面的项目都是他所向披靡的,当然他想获得所有项目的No1,但是一个人的精力总是有限的,ZEH也是只有P(Power的简写,一个大于0且小于10

2015-10-16 16:33:02 435

原创 [sicily]1342. 开心的金明

1342. 开心的金明ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription金明今天很开心,家里购置的新房就要领钥匙了,新房里有一间他自己专用的很宽敞的房间。更让他高兴的是,妈妈昨天对他说:“你的房间需要购买哪些物品,怎么布置,你说了算,只要不超过N元钱就行”。今天一早金明就开始做预算,但是他想买的东西太多了,

2015-10-15 21:32:09 385

原创 [sicily]1341. 明明的随机数

1341. 明明的随机数ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescription明明想在学校中请一些同学一起做一项问卷调查,为了实验的客观性,他先用计算机生成了N个1到1000之间的随机整数(N≤100),对于其中重复的数字,只保留一个,把其余相同的数去掉,不同的数对应着不同的学生的学号。然后再把这些数从小到大排

2015-10-15 20:49:06 367

30天自制操作系统

30天自制操作系统 光盘源码,十分适合想自己动手写一个操作系统的童鞋。

2019-02-22

空空如也

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

TA关注的人

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