http://codeforces.com/problemset/problem/990/B 题意: 有n个细菌,每个细菌的尺寸为ai,现在有以常数k,如果细菌i的尺寸ai大于细菌j的尺寸aj,并且ai<=aj+k,那么细菌i就可以吃掉细菌j,问最后可以剩于多少个细菌。 做法: 用map记录相同尺寸 ...
分类:
其他好文 时间:
2019-11-14 19:54:01
阅读次数:
66
Write an algorithm to determine if a number is "happy". A happy number is a number defined by the following process: Starting with any positive intege ...
分类:
移动开发 时间:
2019-11-13 23:56:47
阅读次数:
181
参考资料:梯度下降优化算法总结(必看!!!!!!!) 梯度下降法 (Gradient Descent Algorithm,GD) 是为目标函数J(θ),如代价函数(cost function), 求解全局最小值(Global Minimum)的一种迭代算法。 为什么使用梯度下降法 我们使用梯度下降法 ...
分类:
编程语言 时间:
2019-11-13 22:30:05
阅读次数:
144
" 题目传送门 " 讲真,既然质监员这么聪明,为什么要让我们帮他设计程序? ~~所以还是叫ZZ的质检员吧~~ 其实,我最想说的,不是这个题,而是这个$\Sigma$~~(一见 $\Sigma$ 就懵逼系列)~~ 这个题的式子是这样的: 嗯,它的意思是:在$L_i$到$R_i$这段区间里,合法的矿石的 ...
分类:
其他好文 时间:
2019-11-13 22:00:17
阅读次数:
65
Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti ...
分类:
其他好文 时间:
2019-11-13 12:58:51
阅读次数:
98
SHA-1(英语:Secure Hash Algorithm 1,中文名:安全散列算法1)是一种密码散列函数,美国国家安全局设计,并由美国国家标准技术研究所(NIST)发布为联邦数据处理标准(FIPS)。SHA-1可以生成一个被称为消息摘要的160位(20字节)散列值,散列值通常的呈现形式为40个十 ...
分类:
其他好文 时间:
2019-11-13 10:31:14
阅读次数:
157
注意此类要处理前导零的数位DP题,因为如果前面全是0,这一位可以填0和1。 #include<cstdio> #include<iostream> #include<cstring> #include<algorithm> #include<cmath> using namespace std; i ...
01-视图的含义 视图是从一个或者多个表中导出的,视图的行为与表非常相似,但视图是一个虚拟表。视图还可以从已经存在的视图的基础上定义。 02-创建视图 # 基本语法格式: CREATE [OR REPLACE] [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE} ...
分类:
数据库 时间:
2019-11-12 09:26:47
阅读次数:
90
二进制优化 #include<iostream> #include<cstdio> #include<algorithm> #include<cstdlib> #include<cmath> using namespace std; const int maxn = 25000; const int ...
分类:
其他好文 时间:
2019-11-11 21:24:58
阅读次数:
74
luogu1387最大正方形 O(n^2) 1 #include<cstdio> 2 #include<algorithm> 3 using namespace std; 4 int f[105][105]; 5 //f[i][j]代表以i,j为右下角的前i,j区域内的最大正方形 6 int mai ...
分类:
其他好文 时间:
2019-11-11 20:00:39
阅读次数:
63