某岛

Educational Codeforces Round 138

Original link: https://www.shuizilong.com/house/archives/educational-codeforces-round-138/ https://codeforces.com/contest/1728 https://zhuanlan.zhihu.com/p/575699975 https://zhuanlan.zhihu.com/p/575702697 Problem D. Letter Picking Interval game dp, state f[][], but simpler than general game dp, transition trivial. First of all, we can bind the two rounds of operations together to transfer, as long as the state with an even length is considered, and there is no need to record […]

Educational Codeforces Round 138 Read More »

NovelAI Bot

Original link: https://www.shuizilong.com/house/archives/novelai-bot/ NovelAI’s local leaked version of the tutorial to achieve the effect of the online version – Programmer Sought https://github.com/koishijs/novelai-bot This article is reprinted from: https://www.shuizilong.com/house/archives/novelai-bot/ This site is for inclusion only, and the copyright belongs to the original author.

NovelAI Bot Read More »

Canon

Original link: https://www.shuizilong.com/house/archives/canon/ theoretical knowledge What is Canon conduct? The video above has the history of the Canon. Anyway, you can understand it as cpp std library. . . 6 Ways to Make Your Canon Progression Sound Different This video teaches some transformation methods. . . (Probably similar to how to extend the line segment

Canon Read More »

Educational Codeforces Round 135

Original link: https://www.shuizilong.com/house/archives/educational-codeforces-round-135/ https://codeforces.com/contest/1728 https://zhuanlan.zhihu.com/p/562734265 Problem D. Letter Picking Interval game dp, state f[][], but simpler than general game dp, transition trivial. First of all, we can bind the two rounds of operations together to transfer, as long as the state with an even length is considered, and there is no need to record what

Educational Codeforces Round 135 Read More »

Codeforces Round #819

Original link: https://www.shuizilong.com/house/archives/codeforces-round-819/ https://codeforces.com/contest/1726 https://zhuanlan.zhihu.com/p/562689105 C. Jatayu’s Balanced Bracket Sequence adjustment method. The base case is ((())). . The connected components are n. We observe under what circumstances the connected component decreases. (()()). . Like this. . The condition is that a sequence of parentheses at the same level has occurred before such that there

Codeforces Round #819 Read More »

The summer of watt meow

Original link: https://www.shuizilong.com/house/archives/summer-of-nova-cat/ https://mp.weixin.qq.com/s/MBB8W0Ws4bI-rPlHADr3Vg This article is reprinted from: https://www.shuizilong.com/house/archives/summer-of-nova-cat/ This site is for inclusion only, and the copyright belongs to the original author.

The summer of watt meow Read More »

NOI 2022

Original link: https://www.shuizilong.com/house/archives/noi-2022/ https://www.zhihu.com/question/548696144 https://blog.csdn.net/liuzhangfeiabc/article/details/126594264 D1T1 https://www.luogu.com.cn/problem/P8496 This article is reprinted from: https://www.shuizilong.com/house/archives/noi-2022/ This site is for inclusion only, and the copyright belongs to the original author.

NOI 2022 Read More »

Luogu P3765 Presidential Election

Original link: https://www.shuizilong.com/house/archives/luogu-3765/ https://www.luogu.com.cn/problem/P3765 #include <lastweapon/io> #include <bits/stdc++.h> #include <ext/pb_ds/tree_policy.hpp> #include <ext/pb_ds/assoc_container.hpp> using namespace __gnu_pbds; using namespace lastweapon; #define ls id<<1 #define rs id<<1|1 const int N = int(5e5) + 9; int k,aa[N]; struct xd_node { int l,r; int cnt,num;//Maintain a serial number of cnt and mode like the problem of finding mode}treee[4*N]; struct xd_treee

Luogu P3765 Presidential Election Read More »

Luogu P3369 [Template] Ordinary Balanced Tree

Original link: https://www.shuizilong.com/house/archives/luogu-3369/ https://www.luogu.com.cn/problem/P3369 #include <lastweapon/io> using namespace lastweapon; namespace SBT { const static int N = int(1e5) + 9; int c[2][N], sz[N], ky[N], tot; #define lc[d] #define rc[!d] #define lx l[x] #define rx r[x] #define kx ky[x] #define sx sz[x] #define d 0 int new_node(int v = 0){ int x=tot++;lx=rx=0; sx=1;kx=v; return x; }

Luogu P3369 [Template] Ordinary Balanced Tree Read More »

network country

Original link: https://www.shuizilong.com/house/archives/the-network-state/ During the Covid-19 period, everyone must have read a lot of books~~ Former Coinbase CTO, Balaji Srinivasan , published a book online last month called “The Nation of the Web.” Speaking of which, blockchain nation building has always been a topic of discussion. In the early years, there was an attempt to

network country Read More »

Rotary jam

Original link: https://www.shuizilong.com/house/archives/rotating-calipers/ https://oi-wiki.org/geometry/rotating-calipers/ https://www.luogu.com.cn/problem/P1452 | https://vjudge.net/problem/POJ-2187 diameter https://codeforces.com/contest/1578/problem/F Integral, Minimum Covering Rectangle https://vjudge.net/problem/POJ-3608 Convex Hull Spacing #include <lastweapon/geometry> using namespace lastweapon; using namespace CG; typedef vector<Po> VP; #define suc(x) (x+1==n?0:x+1) DB rc(const VP&P){ int n = SZ(P)-1, j = 1; DB d2 = 0; REP(i, n){ while (dett(P[i+1]-P[i], P[j+1]-P[j])>0) j=suc(j); checkMax(d2, max(dist2(P[i], P[j]), dist2(P[i+1],

Rotary jam Read More »

OFAC Sanctions && Tornado Cash

Original link: https://www.shuizilong.com/house/archives/ofac-sanctions-tornado-cash/ https://twitter.com/MinakoOikawa/status/1562976452571967488 https://blog.bitmex.com/ofac-sanctions-ethereum-pos-some-technical-nuances/ This article is reprinted from: https://www.shuizilong.com/house/archives/ofac-sanctions-tornado-cash/ This site is for inclusion only, and the copyright belongs to the original author.

OFAC Sanctions && Tornado Cash Read More »

BZOJ 1185. [HNOI2007] Minimum Rectangle Coverage

Original link: https://www.shuizilong.com/house/archives/bzoj-1185-hnoi2007%E6%9C%80%E5%B0%8F%E7%9F%A9%E5%BD%A2%E8%A6 %86%E7%9B%96/ Classic question. . test template. . #include <lastweapon/geometry> using namespace lastweapon; using namespace CG; typedef vector<Po> VP; /*#define suc(x) (x+1==n?0:x+1) DB rc(const VP&P){ int n = SZ(P)-1, j = 1; DB d2 = 0; REP(i, n){ while (dett(P[i+1]-P[i], P[j+1]-P[j])>0) j=suc(j); checkMax(d2, max(dist2(P[i], P[j]), dist2(P[i+1], P[j+1]))); } return d2; }*/ #define suc(x)

BZOJ 1185. [HNOI2007] Minimum Rectangle Coverage Read More »