-
最近没什么时间更新了,今后更新频率会降低,但同时一次的内容也更多。
-
这个月的kickstart好可惜啊。。。
痛失35分。。其实就是太菜了。。。 -
开始在AcWing上打卡,逐步完成《算法竞赛进阶指南》的内容。
1. 重温扫描线写法
窗内的星星
#include<bits/stdc[......]
第一题滑动窗口+multiset的运用
第二题将两个不等式条件转化为两个点的位置关系(一个点在另一个点的右上方),这个转化像整体换元,感觉很巧妙…然后贪心。
第三题四维dp+前缀和处理,参考了【Kickstart】2018 Round D – Funniest Word Search
以下是第三[……]
对延迟标记要有深入的理解。。。多个标记同时存在时要考虑顺序
参考:http://www.cfzhao.com/2019/04/03/hdu-4578-transformation/
#include <bits/stdc++.h>
typedef long long ll;
usin[......]
构造一个长度为N的只有‘0’和‘1’的串s,满足K个限制(s[A,B]中含有C个1),且这个串在所有满足限制的合法串当中为字典序第P大.
状压dp,f[i][j]:假设前i个字符已固定,且这前i个中最后16个字符为j时的合法方案数(注意j前[……]
题目来源:SGU 385
图片来自国家集训队论文《浅析竞赛中一类数学期望问题的解决方法》
其中min(j,i-j+1) 更改为min(j-1,i-j)貌似更合适。
#include<bits/stdc++.h>
using namespace std;
double d[105];[......]
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
const int SIZE = 100010;
struct SegmentTree{
int l[......]
RT,线段树单点修改,区间查询.
#include <cstdio>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include[......]