摘要:
[[This is a tag]] 建图,然后在图上使用一种遍历策略来输出一种遍历顺序,构造出了答案序列 虽然链表似乎也可以,但是建图简单得多 #include<bits/stdc++.h> using namespace std; const int N=100005; int n,T,a,b[N 阅读全文
posted @ 2022-12-11 11:51
-WD-
阅读(67)
评论(0)
推荐(0)
摘要:
[[inverse element]] link: E - Balance Addicts 虽然说CF上有DP标签,但是不能算完全意义上的DP,可以不通过DP来理解 就是在到 $i$ 的前缀和 和 到 $j$ 的后缀和相同时做处理 如果没有0就是每次找到直接ans*=2 现在有0就复杂一点,两边能分 阅读全文
posted @ 2022-12-11 11:50
-WD-
阅读(78)
评论(1)
推荐(1)
摘要:
date: 2022-10-21 div1 这是一场VP 过了两题,阻力很大,都调了很久,结果一看一道1600,一道1700 还是得画草稿,要写清楚每个数组的含义 [[DP]] link: A - Tokitsukaze and Strange Inequality 一眼就能看出是DP,然后 根据这 阅读全文
posted @ 2022-12-11 11:49
-WD-
阅读(71)
评论(0)
推荐(0)
摘要:
[[Dijkstra]] [[Game theory]] [[DP]] link CF原题 先用dijkstra预处理两个点到所有点的最短距离 然后就能用两个距离来描述一个点了 对于两个最短路相等的点,实际上他们没有差别,可以直接合并 由于两个数表示一个点,可以离散化之后,直接建一个坐标系(一个矩阵 阅读全文
posted @ 2022-12-11 11:48
-WD-
阅读(62)
评论(0)
推荐(0)
摘要:
[[math]] [[matrices]] [[fast_exponentiation]] link Consider ignoring the modulo, then calculate at the same time. $$ \begin{aligned} dx&=x+y+dx+t\ dy& 阅读全文
posted @ 2022-12-11 11:48
-WD-
阅读(62)
评论(0)
推荐(0)
摘要:
#my [[two pointers]] [[LCA]] [[DFS Tour & Euler Tour]] [[map]] This problem took me three nights. Calculate the longest length of interval of indices 阅读全文
posted @ 2022-12-11 11:48
-WD-
阅读(70)
评论(0)
推荐(0)
摘要:
#my [[interval DP]] link Pro Calculate the number of states(interval sequence) meet following conditions: Each interval does not belong to any other i 阅读全文
posted @ 2022-12-11 11:48
-WD-
阅读(63)
评论(0)
推荐(0)
摘要:
[[Centroid Decomposition]] link Build the centroid tree Precalculate the distances from the centroids to every node in their subtrees, for adding mark 阅读全文
posted @ 2022-12-11 11:48
-WD-
阅读(66)
评论(0)
推荐(0)
摘要:
#my [[math]] link First, it's obvious that the numbers put can be only 1 or -1. If k equals to -1 and the parity of n and m differ, the answer is obvi 阅读全文
posted @ 2022-12-11 11:48
-WD-
阅读(78)
评论(0)
推荐(0)
摘要:
#my [[dfs]] [[Base Ring Tree]] link At first, I felt confused about the description. calculate the number of simple paths in a completed binary tree w 阅读全文
posted @ 2022-12-11 11:48
-WD-
阅读(74)
评论(0)
推荐(0)

浙公网安备 33010602011771号