This is an era of team success, but also an era of heroes. Throughout the ages, there have been numerous examples of using the few to defeat the many. ...
分类:
其他好文 时间:
2019-09-08 21:54:02
阅读次数:
130
比较自闭的一场网络赛,题目质量不错。 题目链接:https://www.jisuanke.com/contest/3004 A: upsolver: czq 经典的二维偏序问题,求(x,y)左下角点的个数。对x和y升序排序,用树状数组维护每个纵坐标y已经出现的次数,这样就可以动态把点的纵坐标加入树状 ...
分类:
其他好文 时间:
2019-09-06 22:39:16
阅读次数:
119
git 基本命令之一 git init 初始化一个git仓库 git add file1 file2 ... 允许把一个或者多个文件添加到仓库 git commit -m "xxxx" 把文件提交到仓库 git status 查看工作区的状态 git diff 查看修改内容 git diff HEA ...
分类:
其他好文 时间:
2019-09-05 23:15:34
阅读次数:
119
t题目链接:https://nanti.jisuanke.com/t/41290 思路:题目意思很容易想到floyd,但是由于危险度的限制,我们该怎么跑floyd呢。 一开始理解错题目了,以为u->v包括终点起点都不能超过给的危险度,不过看样例,好像只需要中间的城市不能超过危险度。 我们可以这么想, ...
分类:
其他好文 时间:
2019-09-05 18:40:39
阅读次数:
94
分析: 当n=1时ans=4=f(5)-1; n=2,ans=12=f(7)-1; n=3,ans=33=f(9)-1; 于是大胆猜想ans=f(2*k+3)-1。 之后用矩阵快速幂求解f(n)即可,O(logn)。 AC code: 1 #include<bits/stdc++.h> 2 usin ...
分类:
其他好文 时间:
2019-09-03 22:06:08
阅读次数:
80
代码十分简单,通过对比vs,得知gcc调用的是ostream.tcc文件中的write函数write(const _CharT* __s, streamsize __n)。 vs中是定义在ostream文件中的write(const _Elem* _Str,streamsize _Count),gc ...
分类:
其他好文 时间:
2019-09-03 13:42:26
阅读次数:
141
CSE599:online and adaptive machine learning Lecture 3:Stochastic Multi-Armed Bandits, Regret Minimization csdn bandit 算法(3) -- UCB算法 推荐系统的EE问题及Bandit算 ...
分类:
其他好文 时间:
2019-09-02 09:40:39
阅读次数:
83
Problem Description 给定三个数 $k,pa,pb$ ,每次有 $\frac{pa}{pa+pb}$ 的概率往后面添加一个 ,有 $\frac{pb}{pa+pb}$ 的概率往后面添加一个 ,当出现了 $k$ 个形如 的子序列(不用连续)时停止。 求最后子序列 的期望个数。 答案对 ...
分类:
其他好文 时间:
2019-09-01 17:00:19
阅读次数:
67
Bahiyyah has a convex polygon with nn vertices P0,P1,?,Pn?1P0,P1,?,Pn?1 in the counterclockwise order. Two vertices with consecutive indexes are adjac ...
分类:
其他好文 时间:
2019-09-01 10:37:36
阅读次数:
80