某岛

EC Final

Original link: https://www.shuizilong.com/house/archives/ec-final/ 2018 Gym Bilibili J.Philosophical … Balance Question meaning: Given a string of length n, record s_i as the suffix starting from i, find:     n ≤ 2×10^5 Practice: lcp + Nash equilibrium 2019 Gym 2021 Gym This article is transferred from: https://www.shuizilong.com/house/archives/ec-final/ This site is only for collection, and the copyright […]

EC Final Read More »

Lagrangian inversion theorem

Original link: https://www.shuizilong.com/house/archives/lagrange-inversion-theorem/ material Talking about Polynomial Composition and Lagrangian Inversion, alpha1022 Polynomial Composition and Lagrangian Inversion Study Notes, siriehn_nx Newton’s Method of Polynomial, picks Lagrange inversion theorem, adamant This thing seems to have been mentioned in concrete mathematics. . . But the angle is different? ? exercise Luogu P5373. [Template] Polynomial composite function Luogu

Lagrangian inversion theorem Read More »

Luogu P5827. Vertex Biconnected Graph Counting

Original link: https://www.shuizilong.com/house/archives/luogu-p5827-%E7%82%B9%E5%8F%8C%E8%BF%9E%E9%80%9A%E5%9B% BE%E8%AE%A1%E6%95%B0/ https://www.luogu.com.cn/problem/P5827 There is a thing called labeled counting lemma. In fact, it explains the combination meaning of EGF convolution. It is said to give two EGF, F(x), G(x), then F(x)*G(x) is the ordered pair of objects generated after the two objects are relabeled, for example, if C(x ) is a connected

Luogu P5827. Vertex Biconnected Graph Counting Read More »

unlabeled connected graph

Original link: https://www.shuizilong.com/house/archives/%E6%97%A0%E6%A0%87%E5%8F%B7%E8%BF%9E%E9%80%9A%E5% 9B%BE/ https://oeis.org/A001349 Weisstein, Eric W. “Euler Transform.” From MathWorld–A Wolfram Web Resource. Solution to P5900 【Unlabeled Unrooted Tree Counting】 No related topic found 0.0. #include <lastweapon/poly> #include <lastweapon/number> using namespace lastweapon; const int N = int(1e2) + 9; VVI Partition; VI cur; int n, m; void gen(int n, int s = 1){

unlabeled connected graph Read More »

At Coder Beginner Contest 284

Original link: https://www.shuizilong.com/house/archives/atcoder-beginner-contest-284/ Ex. Count Unlabeled Graphs In the case of k = 1, it is obviously an unlabeled graph count. So the practice will certainly not be weaker than the original question . Recalling the original question, we classify the symmetry group of the point set according to the cycle index, and then generate

At Coder Beginner Contest 284 Read More »

Luogu P4708. Drawing

Original link: https://www.shuizilong.com/house/archives/luogu-p4708-%E7%94%BB%E7%94%BB/ Title meaning Unlabeled Euler graph count analyze The method is basically the same as SGU 282. Isomorphism . #include <lastweapon/number> using namespace lastweapon; const int N = int(5e1) + 9; Int Fact[N]; VVI Partition; VI cur; int n; void gen(int n = ::n, int s = 1){ if (!n){ Partition.PB(cur); } else

Luogu P4708. Drawing Read More »

Luogu P6295. Labeled DAG count

Original link: https://www.shuizilong.com/house/archives/luogu-p6295-%E6%9C%89%E6%A0%87%E5%8F%B7-dag-%E8%AE%A1%E6 %95%B0/ For labeled graphs, assuming that we have obtained the EGF in the case of disconnection, then there are common routines for finding the corresponding connected graph (see the problem of urban planning and the problem of desert ). Therefore, the problem is converted into a disconnected situation, which is the previous

Luogu P6295. Labeled DAG count Read More »

BZOJ #2863. Angry Führer

Original link: https://www.shuizilong.com/house/archives/bzoj-2863-%E6%84%A4%E6%80%92%E7%9A%84%E5%85%83%E9%A6% 96/ set up It means that there are exactly j schemes whose in-degree is 0, there are: (1)   The complexity is O(n3), we can use the prefix and + redundancy to optimize the enumeration in the inner layer, there are: (2)   Here, Newton’s binomial expansion is used, (1+x)^n, and x

BZOJ #2863. Angry Führer Read More »

HDU 3303. Harmony Forever

Original link: https://www.shuizilong.com/house/archives/hdu-3303-harmony-forever/ Title meaning For the set S, there are two operations: 1, BX; 2, AY. BX means adding X to the set S, and assigning X a serial number, which represents the number it is; AY means finding the smallest number mod Y from the set S, and outputting the number of the

HDU 3303. Harmony Forever Read More »

Talk about “Tomorrow’s Ark Side Story Lone Star” and “Crash: Star Railway”

Original link: https://www.shuizilong.com/house/archives/isolated-star-rail/ Table of Contents Technology world view script Christen vs Cocolia gameplay conception During CP29, these two things happened to be launched at the same time, so maybe it is meaningful to compare them. Of course, I don’t like to criticize one another. Of course, these two games are very good mobile games

Talk about “Tomorrow’s Ark Side Story Lone Star” and “Crash: Star Railway” Read More »

Luogu P4841. [Training Team Work 2013] Urban Planning

Original link: https://www.shuizilong.com/house/archives/luogu-p4841-%E9%9B%86%E8%AE%AD%E9%98%9F%E4%BD%9C%E4%B8% 9A2013%E5%9F%8E%E5%B8%82%E8%A7%84%E5%88%92/ Luogu | BZOJ https://www.cnblogs.com/Narh/p/10046287.html Title meaning Counting of labeled connected graphs. – https://oeis.org/A001187 analyze Very classic topic, we all know that there are three ways! Divide and conquer FFT … polynomial inversion https://darkbzoj.cc/submission/236083 polynomial logarithm https://darkbzoj.cc/submission/236071 This article is reproduced from: https://www.shuizilong.com/house/archives/luogu-p4841-%E9%9B%86%E8%AE%AD%E9%98%9F%E4%BD%9C%E4%B8% 9A2013%E5%9F%8E%E5%B8%82%E8%A7%84%E5%88%92/ This site is only for collection, and the

Luogu P4841. [Training Team Work 2013] Urban Planning Read More »

LiberOJ #3723. “SDOI / SXOI2022” substring statistics

Original link: https://www.shuizilong.com/house/archives/liberoj-3723-%E3%80%8Csdoi-sxoi2022%E3%80%8D%E5%AD%90%E4%B8%B2%E7% BB%9F%E8%AE%A1/ https://loj.ac/p/3723 https://www.cnblogs.com/zkyJuruo/p/16403110.html Title meaning Very amazing question. . . Consider violent dp. . It is not difficult to have. . FOR(i, 1, n) { REP(l, ni) { int r = l + i; dp[l][r] = (dp[l+1][r] + dp[l][r-1]) * occ[l][r]; } } As long as the suffix array is used to

LiberOJ #3723. “SDOI / SXOI2022” substring statistics Read More »

On O(n) – O(1) RMQ

Original link: https://www.shuizilong.com/house/archives/on-on-o1-rmq/ LCA and RMQ questions are closely related, and usually I think RMQ should be simpler than LCA, after all, the former is a question of sequence, but it seems that this is wrong? The earliest O(n)-O(1) RMQ algorithm is converted into LCA and then done. So the relationship between them may be

On O(n) – O(1) RMQ Read More »