代码如下: 1 import matplotlib.pyplot as plt 2 from random import choice 3 class RandomWalk(): 4 def __init__(self,num_points=5000): 5 self.num_points=num_ ...
分类:
编程语言 时间:
2020-02-26 01:44:35
阅读次数:
93
思路:为需要遍历的 mapping 再准备一个 list,之后通过 for 循环遍历 list 取得 mapping 的 key。 mapping (address => uint) usersValue mapping (uint => address) list uint length = xx ...
分类:
移动开发 时间:
2020-02-25 23:15:28
阅读次数:
188
$$ \texttt{Preface} $$ 赛时,把 " 任意时刻 " 理解成 " 整数时刻 " 了,看起来一脸不可做的亚子,还各种推式子。 ~~话说我为什么觉得 E 比 F 还难。~~ $$ \texttt{Description} $$ 一个坐标轴 $OX$ 上有 $n$ 个点,第 $i$ 个 ...
分类:
其他好文 时间:
2020-02-25 12:32:36
阅读次数:
108
A. Two Rabbits "原题" Problem Restatement 两个兔子以恒定速度相向而行,求相遇时间?若无法在整时间相遇,输出$ 1$ Solution 相遇问题,距离除以总速度为时间,看时间是否为整数即可。 Code ...
分类:
其他好文 时间:
2020-02-25 09:37:51
阅读次数:
43
LeetCode 1362. Closest Divisors最接近的因数【Medium】【Python】【数学】 Problem "LeetCode" Given an integer , find the closest two integers in absolute difference w ...
分类:
编程语言 时间:
2020-02-23 20:17:07
阅读次数:
90
Long story short, shashlik is Miroslav's favorite food. Shashlik is prepared on several skewers simultaneously. There are two states for each skewer: ...
分类:
其他好文 时间:
2020-02-23 17:59:52
阅读次数:
59
This simple example raises a number of important points. First, the price is set by the buyer who is willing to pay the highest price. This price is n ...
分类:
其他好文 时间:
2020-02-23 11:53:35
阅读次数:
81
torch.linspace torch.linspace(start, end, steps) returns a one-dimensional tensor of equally spaced points between [start, end]。steps默认值是100。 torch.ra ...
分类:
其他好文 时间:
2020-02-22 14:16:13
阅读次数:
96
凸包的定义: 包含点集 S 所有点的最小凸多边形称为凸包。 凸包绘制原理:Graham 扫描法 首先选择 y 方向上最低的点作为起始点 p0。 然后以 p0 为原点,建立极坐标系,做逆时针极坐标扫描,依次添加凸包点 p1,p2 ...pn(排序顺序根据极坐标角度大小) 若当前扫描点与下一个点构成的直 ...
分类:
其他好文 时间:
2020-02-22 12:20:57
阅读次数:
134
1009 Product of Polynomials 题目原题 [TOC] This time, you are supposed to find A × B where A and B are two polynomials. Input Specification: Each input fi ...
分类:
其他好文 时间:
2020-02-21 18:29:34
阅读次数:
61