problem:https://leetcode.com/problems/max-consecutive-ones-iii/ 维护最多包含k个0的滑动窗口,一旦超过了k个0,把队首的0 pop出来。不断更新当前滑动窗口中的数据个数,并取最大值返回即可。 ...
分类:
其他好文 时间:
2019-08-02 13:24:06
阅读次数:
112
Lab 4: PredictorsSTAT 462: Summer 2019 Note: You will work on this activity on 07/25 and 07/27. On July 25th, you should complete at least the first a ...
分类:
其他好文 时间:
2019-08-01 20:19:14
阅读次数:
125
# 随机生成双色球import random# 随机数 1-16之间# r = random.randint(1,16)# print(r)phone_numbers_str = "匪警[110],火警[119],急救中心[120],道路交通事故报警[122],水上求救专用电话[12395],天气预 ...
分类:
编程语言 时间:
2019-07-31 15:01:27
阅读次数:
107
1.变量的赋值: python给变量赋值时不需要声明变量的数据类型,直接用等号便可赋值,如:a=1或者b="python" 2.标准数据类型: python有五个标准的数据类型:Numbers(数字),String(字符串),List(列表),Tuple(元组),Dictionary(字典)。 3. ...
分类:
编程语言 时间:
2019-07-31 14:40:17
阅读次数:
108
原题链接:https://hpuoj.com/contest/24/problem/E/ 思路:一般的尺取法,不断更新左端点的值。 这是直接调用库函数的一种写法(和上面的原理一样): ...
分类:
编程语言 时间:
2019-07-28 17:57:30
阅读次数:
145
/** * This problem was asked by Microsoft. Given an array of numbers and a number k, determine if there are three entries in the array which add up to... ...
分类:
其他好文 时间:
2019-07-28 14:09:51
阅读次数:
106
格式化快捷键: CTRL + ALT + L 配置等号对齐: 1. Setting 2. Editor 3. Code Style 4. PHP 5. Wrapping and Braces 6. 勾选Align consecutive assignments 配置key-value对齐: 1. S ...
分类:
Web程序 时间:
2019-07-25 12:09:02
阅读次数:
469
Transformation 题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=4578 Problem Description Yuanfang is puzzled with the question below: There are n intege ...
分类:
编程语言 时间:
2019-07-24 22:23:30
阅读次数:
118
A. Reachable Numbers A. Reachable Numbers Let's denote a function f(x)f(x) in such a way: we add 11 to xx, then, while there is at least one trailing ...
分类:
其他好文 时间:
2019-07-24 17:59:46
阅读次数:
106
1、AOPS论坛 2、匈牙利语版本 3、英文版本 4、其它试题 Suppose that $f: \mathbb{R}^+ \to \mathbb{R}^+$ is a continuous function such that for all positive real numbers $x,y$ ...
分类:
其他好文 时间:
2019-07-23 00:03:09
阅读次数:
120