摘要: 1 --例8.2.1创建自定义标量函数TOTAL()用来计算任意两数之和。 2 create function total(@a int, @b int) 3 returns int 4 begin 5 declare @c int 6 select @c = @a + @b 7 return @c 阅读全文
posted @ 2019-11-11 12:31 滚烫的青春 阅读(476) 评论(0) 推荐(0) 编辑
摘要: 1、 numpy求均值、方差、标准差 1 import numpy as np 2 3 arr = [1,2,3,4,5,6] 4 #求均值 5 arr_mean = np.mean(arr) 6 #求方差 7 arr_var = np.var(arr) 8 #求标准差 9 arr_std = np 阅读全文
posted @ 2019-11-11 00:19 滚烫的青春 阅读(174) 评论(0) 推荐(0) 编辑
摘要: According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insert 阅读全文
posted @ 2019-11-08 20:25 滚烫的青春 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 题目:3 * 3拼图游戏, 输入一种状态,问你是不是能还原成最终状态。 分析: 1、从最终状态开始逆向bfs 2、通过数组记录状态,可以用map映射,也可以用康托展开压缩。 代码: 1 #include <bits/stdc++.h> 2 using namespace std; 3 const i 阅读全文
posted @ 2019-11-08 00:23 滚烫的青春 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 触发器 --1、使用DDL触发器limited来防止数据库中的任一表被修改或删除(自定义错误提示)。????create trigger limitedon databasefor updateasprint'不允许删除操作!'rollback--2、为学生表创建一个简单DML触发器,在插入和修改数 阅读全文
posted @ 2019-11-05 21:38 滚烫的青春 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 题意 q次询问,每次询问给你长度为n的排列,然后你每次可以选择一个位置i和i+1的数字进行交换。但是每个位置只能交换一次,问你反转若干次后,这个排列最小是多少? 分析:模拟题,直接代码。(一开始读错题了,外加思路不清晰) 代码: 1 #include <bits/stdc++.h> 2 using 阅读全文
posted @ 2019-11-05 17:37 滚烫的青春 阅读(474) 评论(0) 推荐(0) 编辑
摘要: 1 # coding: utf-8 2 3 # In[3]: 4 5 6 import numpy as np 7 import matplotlib.pyplot as plt 8 9 def estimate_coefficients(x, y): 10 # size of the dataset OR number of observations/points 11 n = np.size( 阅读全文
posted @ 2019-11-04 00:36 滚烫的青春 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 每一站都是有打铁的可能的,区域赛竞争很激烈,更存在很大的打铁的概率,就拿我&金晖来讲,在你们这个时候徐州站被封了零,在刚过去的ccpc也是一块铁,祥神在大四之前icpc的区域赛也都是毫无建树,比赛就是一个不断历练的过程,可能会伴随着各种问题,知识盲区,状态不好,更有甚者机器有问题,都会导致最后的成绩 阅读全文
posted @ 2019-10-27 16:50 滚烫的青春 阅读(283) 评论(2) 推荐(1) 编辑
摘要: 1 import numpy as np 2 arr = np.array([[2, 3], [5, 4], [9, 6], [4, 7], [8, 1], [7, 2]]) 3 arr.shape 4 5 class KDTree(): 6 def __init__(self): 7 self.value = None 8 self.left = None 9 self.right = None 阅读全文
posted @ 2019-10-22 23:17 滚烫的青春 阅读(293) 评论(0) 推荐(0) 编辑
摘要: 题意:给你一个n * m的矩阵,元素为0/1, 求把所有的元素变成0所需要的最少操作。(每对一个格子操作,该十字格的元素反转) 分析:一看数据量 <= 15, 就有点状态压缩的感jio。从小到大枚举第一行的操作,因为第一行的操作决定了后面所有的操作,所以最后判断对于第一行的操作是不是符合题意即可。 阅读全文
posted @ 2019-10-13 12:18 滚烫的青春 阅读(126) 评论(0) 推荐(0) 编辑