描述 一个数的序列bi,当b1 < b2 < ... < bS的时候,我们称这个序列是上升的。对于给定的一个序列(a1, a2, ..., aN),我们可以得到一些上升的子序列(ai1, ai2, ..., aiK),这里1 <= i1 < i2 < ... < iK <= N。比如,对于序列(1, ...
分类:
编程语言 时间:
2018-10-10 00:02:13
阅读次数:
245
0.引言: 目的:使用智能指针替代LinkList中的原生的指针, 限制:但是我们的智能指针设定了只能单个指针指向某一片堆空间 1. 智能指针的继承层次结构 (1)Pointer是智能指针的抽象父类(模板) ①纯虚析构函数:virtual ~Pointer()=0; ②重载operator->() ...
分类:
其他好文 时间:
2018-10-09 20:03:48
阅读次数:
144
1.项目中用宏的时候,遇到如下警告 Operator '?:' has lower precedence than '*'; '*' will be evaluated first 2.错误原因 *操作符的优先级比 ?符号优先级低,会先*运算,结果也许就并不是自己需要的 类似此错误一般都与优先级有关 ...
分类:
其他好文 时间:
2018-10-09 10:20:26
阅读次数:
226
Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after dividi ...
分类:
其他好文 时间:
2018-10-08 23:13:42
阅读次数:
140
C++操作符重载 下面举个简单的例子介绍重载操作符 cpp include class A { friend std::istream &operator (std::istream &, A &); friend std::ostream &operator (std::istream &in, ...
分类:
编程语言 时间:
2018-10-08 21:37:03
阅读次数:
227
Description bzoj2323 Solution 题目看起来非常复杂。 本质不同的细胞这个条件显然太啰嗦, 是否有些可以挖掘的性质? 1.发现,只要第一次分裂不同,那么互相之间一定是不同的(即使总数目相同)。 所以先考虑第一次分裂后,一个固定小球体数量的情况: 2.第一次分裂后,最后的小球 ...
分类:
其他好文 时间:
2018-10-06 20:39:09
阅读次数:
222
operator模块简单介绍 简单记录一些,详细看官方文档。 operator.concat(a, b) **operator.__concat__(a, b)** 对于 a、b序列,返回 a + b(列表合并) operator.countOf(a, b) 返回 b 在 a 中出现的次数 pera ...
分类:
其他好文 时间:
2018-10-06 15:31:28
阅读次数:
148
画图,每个给出点都有对应区间;先sort,再尽量靠右选;很常见的套路了..//注意不要越界(0,L) struct Q //复习结构{ double l,r; Q(double _l,double _r):l(_l),r(_r){} bool operator < (const Q &a) cons ...
分类:
其他好文 时间:
2018-10-05 19:46:53
阅读次数:
175
题目来源: "http://codeforces.com/group/aUVPeyEnI2/contest/229509" 时间限制:2s 空间限制:512MB 题目大意: 在一个车站中有若干人在队列中等待车辆,求所有人等待时间的期望值 首先给定n和q,随后是n行操作: "+ t k":在t时刻有k ...
分类:
其他好文 时间:
2018-10-04 10:07:32
阅读次数:
144
import numpy as np import operator import matplotlib import matplotlib.pyplot as plt import os def createDataSet(): group = np.array([[1.0, 1.1], [1.0... ...
分类:
其他好文 时间:
2018-10-04 09:42:03
阅读次数:
159