POJ——2299(Ultra-QuickSort)树状数组求逆序数

In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in ascending order. For the input sequence 9 1 0 5
分类: 其他 发布时间: 11-29 22:32 阅读次数: 0

POJ——3070 Fibonacci (矩阵快速幂求fibonacci)

In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the first ten terms of the Fibonacci sequence are: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, … An alternative formula for the Fibonacci sequence is . Given an
分类: 其他 发布时间: 11-29 22:32 阅读次数: 0

HDU——3577 Fast Arrangement (线段树+区间更新+最值查询)

Chinese always have the railway tickets problem because of its' huge amount of passangers and stations. Now goverment need you to develop a new tickets query system. One train can just take k passangers. And each passanger can just buy one ticket fr
分类: 其他 发布时间: 11-29 22:31 阅读次数: 0

PTA 7-2 一元多项式的乘法与加法运算 (20 分)

7-2 一元多项式的乘法与加法运算 (20 分) 设计函数分别求两个一元多项式的乘积与和。 输入格式: 输入分2行,每行分别先给出多项式非零项的个数,再以指数递降方式输入一个多项式非零项系数和指数(绝对值均为不超过1000的整数)。数字间以空格分隔。 输出格式: 输出分2行,分别以指数递降方式输出乘积多项式以及和多项式非零项的系数和指数。数字间以空格分隔,但结尾不能有多余空格。零多项式应输出0 0。 输入样例: 4 3 4 -5 2 6 1 -2 0 3 5 20 -7 4 3 1
分类: 其他 发布时间: 11-29 22:31 阅读次数: 0

HDU - 1232 畅通工程(并查集)

某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input 测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( < 1000 )和道路数目M;随后的M行对应M条道路,每行给出一对正整数,分别是该条道路直接连通的两个城镇的编号。为简单起见,城镇从1到N编号。 注意:两个城市之间可以有多
分类: 其他 发布时间: 11-29 22:31 阅读次数: 0

HDU——2376 Average distance (树形dp)

Given a tree, calculate the average distance between two vertices in the tree. For example, the average distance between two vertices in the following tree is (d 01 + d 02 + d 03 + d 04 + d 12 +d 13 +d 14 +d 23 +d 24 +d 34)/10 = (6+3+7+9+9+13+15+10+
分类: 其他 发布时间: 11-29 22:31 阅读次数: 0

6-21 是否二叉搜索树 (25 分)

本题要求实现函数,判断给定二叉树是否二叉搜索树。 函数接口定义: bool IsBST ( BinTree T ); 其中BinTree结构定义如下: typedef struct TNode *Position; typedef Position BinTree; struct TNode{ ElementType Data; BinTree Left; BinTree Right; }; 函数IsBST须判断给定的T是否二叉搜索树,即满足如下定义的二叉树:
分类: 其他 发布时间: 11-29 22:30 阅读次数: 0

CF 280B -——Maximum Xor Secondary(单调栈)

Bike loves looking for the second maximum element in the sequence. The second maximum element in the sequence of distinct numbers x1, x2, ..., xk (k > 1) is such maximum element xj, that the following inequality holds: . The lucky number of the sequ
分类: 其他 发布时间: 11-29 22:30 阅读次数: 0

POJ——1273 Drainage Ditches (最大流,ekmaxflow)

Every time it rains on Farmer John's fields, a pond forms over Bessie's favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. Thus, Farmer John has built a set of drainage ditches so
分类: 其他 发布时间: 11-29 22:30 阅读次数: 0

iris_dataset 数据结构

iris_dataset 数据结构 11-22-2018 数据集包含150个数据集,分为3类,每类50个数据,每个数据包含4个属性 ‘data’: array([[5.1, 3.5, 1.4, 0.2], [4.9, 3. , 1.4, 0.2], [4.7, 3.2, 1.3, 0.2], [4.6, 3.1, 1.5, 0.2], [5. , 3.6, 1.4, 0.2], [5.4, 3.9, 1.7, 0.4], [4.6, 3.4, 1.4, 0.3],… ‘target’: arr
分类: 其他 发布时间: 11-29 22:29 阅读次数: 0

K近邻分类

K近邻分类 import numpy as np import matplotlib.pyplot as plt import pandas as pd import mglearn from sklearn.datasets import load_breast_cancer from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier can
分类: 其他 发布时间: 11-29 22:29 阅读次数: 0

KNN回归

KNN回归 import numpy as np import matplotlib.pyplot as plt import pandas as pd import mglearn from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsRegressor X, y = mglearn.datasets.make_wave(n_samples=40) X_tr
分类: 其他 发布时间: 11-29 22:29 阅读次数: 0

python 装饰器的几种类型及使用方法

版权声明:博主原创文章,转载请注明来源,谢谢合作!! https://blog.csdn.net/hl791026701/article/details/84453460
分类: 其他 发布时间: 11-29 22:28 阅读次数: 0

chatbot聊天机器人技术路线汇总

版权声明:博主原创文章,转载请注明来源,谢谢合作!! https://mp.csdn.net/mdeditor/84481818 聊天机器人实现的技术途径 大约可分为4种:1. 第一种是属于“调用第三方API”,也就是说核心代码和数据库不掌握在自己手里。2,3,4属于开源框架,也就是说我们可以下载其源码,采用,相对快速的自己搭建一个聊天机器人,核心代码和数据库都掌握在自己手里。 调用第三方API实现的聊天机器人 图灵机器人 api.ai 机构/作者:Google 流行程度:24,600,000
分类: 其他 发布时间: 11-29 22:28 阅读次数: 0

day32-常见内置模块

一、random模块 #随机小数 >>> random.random() # 大于0且小于1之间的小数0.7664338663654585 >>> random.uniform(1,3) #大于1小于3的小数1.6270147180533838 #随机整数 >>> random.randint(1,5) # 大于等于1且小于等于5之间的整数 >>> random.randrange(1,10,2) # 大于等于1且小于10之间的奇数 #随机选择一个返回 >>> random.choice([1
分类: 其他 发布时间: 11-29 22:28 阅读次数: 0

group_concat的使用

1、场景 仓库使用系统实现了先进先出,给仓库的备货单原先设计如下模式: tx3表: 不同的批次分开行显示,仓库从这个备货单可以知道这个货品需要备货哪些批次,多少数量 用了几天,仓库对此备货单样式提出如下看法 一个备货单很多个货品,一个货品如果存在很多批次,一个备货单需要打印几张纸,比较麻烦 不够直观,希望很直观看到某个货品总的需求量,需要备货的批次与分别的数量 于是,使用group_concat实现此需求 2、group_concat的用法 group_concat的用途:按分组来把多行数据显
分类: 其他 发布时间: 11-29 22:28 阅读次数: 0

计算机操作系统(六)--- 内存 磁盘

DRAM 和 SRAM 随机访问器存储器(Random-Access Memory ,RAM) 分为两类 : 静态和动态. 这两个的区别可以见下面这样图: 持续 指的是动态DRAM的数据需要硬件是不是充电刷新,即需要充电刷新才能维持0或1的状态,而静态RAM只要有供电就会保持状态. 敏感 指的是SRAM一般不容易收到外界影响,一直会保持状态0或者1.而DRAM 当电容的电压受到影响就会影响到数据. 从主存中读取和写入数据 看下面的例图,结合文字来理解. 下面以这个例子来说明读取的过程, 首先传
分类: 其他 发布时间: 11-29 22:28 阅读次数: 0

第一阶段团队成员贡献打分

打分情况: 王栋 10 陈浩东 8 杨洋 6 打分依据: a.通过每天的站立会议发言内容,活跃度,以及提出的建议对于软件的实用度 b.通过在第一阶段的冲刺周期中工作量的大小 c.通过各成员对于自己认领任务的完成情况以及提出的解决方案,并且是否解决
分类: 其他 发布时间: 11-29 22:28 阅读次数: 0

今天发现一个新知识:在QT中startTimer()是QObject类的一个方法,所以只要是QObject的子类,都可以直接调用这个方法

gameTimerID = startTimer(1000);//每隔1s钟启动一次 所以GuessNum这个项目中,在这里可以直接调用
分类: 其他 发布时间: 11-29 22:28 阅读次数: 0

linux 免密登录

ssh-keygen -t rsa -P "" ssh-copy-id -i ~/.ssh/id_rsa.pub root@服务器地址
分类: 其他 发布时间: 11-29 22:28 阅读次数: 0