CF Round 648 (Div.2)/CF1365 这次手慢了一点AC前3题只有+20。或者说一个重要原因是第一题看错了题 WA 了两发。 A. XXXXX 这题我和许多人一样把 Subarray 看成了 Subsequence,于是惨遭两发 WA。它要求求出连续子序列。我们分类讨论。答案是 - ...
分类:
其他好文 时间:
2020-06-15 17:51:54
阅读次数:
55
漫画:图的 “最短路径” 问题 1.当图为无权图时,可以用广度遍历算法bfs获得相隔层次最少的路径。 先加入一个顶点,再while循环,循环中先出一个,再判断是否出的该点是否访问过。若访问过,则continue。continue语句的作度用是跳过循环本中剩余的语句而强行执行下一次循环。 (一个疑问, ...
分类:
编程语言 时间:
2020-06-15 17:49:16
阅读次数:
53
package LeetCode_282 /** * 282. Expression Add Operators * https://leetcode.com/problems/expression-add-operators/description/ * * Given a string that ...
分类:
其他好文 时间:
2020-06-14 20:59:44
阅读次数:
62
$zay$讲的题 luogu P6599 异或 luogu CF1352G Special Permutation luogu CF1360F Spy-string luogu P6599 异或 题目描述 有 \(T\) 组询问,每次给定两个正整数 \(n,l\)。 你需要构造一个长度为 \(l\) ...
分类:
其他好文 时间:
2020-06-14 16:52:53
阅读次数:
71
组件以及执行流程 -引擎找到要执行爬虫,并执行爬虫的start_requests 方法, 并得到一个迭代器。 -迭代器循环时会获取Request对象,而Request对象中封装了要访问的URL和回调函数。 -将所有的Request对象(任务)放到调试器中,用于以后被下载器下载 -下载器云调试器中获取 ...
分类:
其他好文 时间:
2020-06-14 16:35:50
阅读次数:
66
考虑给一个根。记 \(B\) 是有根联通图,\(D\) 是点双连通图。 现在考虑有根无向图: \[ B(x) = x*\exp(\sum_i D_{i+1}/i! B^i) \\ \frac{B(x)}{\exp(D'(B(x)))}=x \] 扩展拉格朗日反演: \[ [x^n] H(\frac{ ...
分类:
其他好文 时间:
2020-06-14 16:23:01
阅读次数:
66
#include<bits/stdc++.h> #define ls rt<<1 #define rs rt<<1|1 using namespace std; typedef long long ll; const int p=1e8+7; int ans1; int ans2; int ans3 ...
分类:
其他好文 时间:
2020-06-14 12:57:25
阅读次数:
164
https://darkbzoj.tk/problem/1855 https://www.luogu.com.cn/problem/P2569 单调队列优化,还是看了一眼题解才做出来的/kk $1\leq BP_i\leq AP_i\leq 1000,1\leq AS_i,BS_i\leq\text ...
分类:
其他好文 时间:
2020-06-13 23:27:24
阅读次数:
76
This blog is meant to give a very high level and generalized introduction into the workflow behind creating games. It is not meant to be a strict guid ...
分类:
其他好文 时间:
2020-06-13 21:29:05
阅读次数:
79
来一个O(nlogn)做法,跑得挺快。 假设点集S包含点X,Y,Z,红色链长度为a,黄色链长度为b,绿色链长度为c。 如果|a-b|>1,那么有|dis(X,Z)-dis(Y,Z)|=|(a+c)-(b+c)|=|a-b|>1,不符合题目要求。 所以a=b或|a-b|=1。所以存在一个点A,到S中每 ...
分类:
其他好文 时间:
2020-06-13 21:06:31
阅读次数:
92