自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 [Leetcode]Sliding Window Maximum

题目描述: Given an array nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding w...

2019-01-29 21:02:24 144

原创 cin和scanf

今天刷着PTA的数据结构与算法题目集,遇到一道题如下:   7-19 求链式线性表的倒数第K项(20 分) 给定一系列正整数,请设计一个尽可能高效的算法,查找倒数第K个位置上的数字。 输入格式: 输入首先给出一个正整数K,随后是若干正整数,最后以一个负整数表示结尾(该负数不算在序列内,不要处理)。 输出格式: 输出倒数第K个位置上的数据。如果这个位置不存在,输出错误信息NULL。 ...

2018-07-31 22:18:36 698

原创 Project Euler 96 Sudoku

Su DokuProblem 96 Su Doku (Japanese meaning number place) is the name given to a popular puzzle concept. Its origin is unclear, but credit must be attributed to Leonhard Euler who invented a similar, ...

2018-03-11 21:37:12 207

原创 Project Euler 83

Path sum: two waysProblem 81 In the 5 by 5 matrix below, the minimal path sum from the top left to the bottom right, by only moving to the right and down, is indicated in bold red and is equal to 2427...

2018-02-24 22:50:05 250

原创 Project Euler 80

Square root digital expansionProblem 80 It is well known that if the square root of a natural number is not an integer, then it is irrational. The decimal expansion of such square roots is infinite wi...

2018-02-19 23:02:23 204

原创 Project Euler 78

Let p(n) represent the number of different ways in which n coins can be separated into piles. For example, five coins can be separated into piles in exactly seven different ways, so p(5)=7.OOOOOOOOO  ...

2018-02-18 15:18:31 350

原创 Project Euler Problem 66

Problem 66 Consider quadratic Diophantine equations of the form:x2 – Dy2 = 1For example, when D=13, the minimal solution in x is 6492 – 13×1802 = 1.It can be assumed that there are no solutions in pos...

2018-02-13 21:50:51 232

原创 Project Euler 1-50小结

本人大一菜狗,趁着寒假没什么事可做,兴致勃勃的刷起了ProjectEuler。Project Euler上的编程题大部分都是数学题,只需要提交一个答案就好(这有别于其它OJ,我喜欢这一点,因为这样在程序里就不用考虑特殊的输入输出),当然你也可以选择用数学知识来笔算得出答案,不管用什么方法,提高能力才是根本的目的。刷完前50题,对某些题还是有所收获有所感触的,记录下来,以便日后翻看。 Proble

2018-02-04 15:44:24 2920

空空如也

空空如也

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

TA关注的人

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