10 2024 档案

摘要:#include<bits/stdc++.h> using namespace std; namespace IO { char buf[50]; } inline void qr(int &x){char ch=getchar(),lst=' ';while(ch>'9'||ch<'0')lst= 阅读全文
posted @ 2024-10-23 20:24 yzc_is_SadBee 阅读(9) 评论(0) 推荐(0) 编辑
摘要:又角果,唐 #include<bits/stdc++.h> using namespace std; const int inf=0x3f3f3f3f; int n,ans=-inf; int a[105]; int f[150][150],g[150][150]; char c[105]; int 阅读全文
posted @ 2024-10-23 19:47 yzc_is_SadBee 阅读(9) 评论(0) 推荐(0) 编辑
摘要:题解 #include<bits/stdc++.h> using namespace std; struct edge { int to,nxt; } e[1000010<<1]; int n,cnt,id; int head[1000010]; long long ans; long long f 阅读全文
posted @ 2024-10-23 18:59 yzc_is_SadBee 阅读(8) 评论(0) 推荐(0) 编辑
摘要:buxiangzuola #include<bits/stdc++.h> using namespace std; #define F(i,a,b) for(register int i=a,i##end=b;i<=i##end;++i) #define UF(i,a,b) for(register 阅读全文
posted @ 2024-10-23 15:57 yzc_is_SadBee 阅读(3) 评论(0) 推荐(0) 编辑
摘要:切不动了!!! #include<bits/stdc++.h> #define rep(i,a,b) for(int i=a;i<=b;++i) using namespace std; inline int read(){int x=0;bool f=0;char ch=getchar();whi 阅读全文
posted @ 2024-10-22 20:39 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; int p,q,dp[15][15],a[15]; void init() { for(int i=0;i<=9;i++) dp[1][i]=1; for(int i=2;i<=10;i++)for(int j 阅读全文
posted @ 2024-10-22 20:08 yzc_is_SadBee 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; typedef long long long long; const int INF=0x3f3f3f3f; const long long mod=1e9+7; long long c1[1000005], 阅读全文
posted @ 2024-10-22 18:54 yzc_is_SadBee 阅读(6) 评论(0) 推荐(0) 编辑
摘要:sb大括号,卡我114514ms #include <bits/stdc++.h> using namespace std; const int maxn=100005,maxk=104,mod=1000000007; int f[maxn][maxk][2][2]; int g[maxk][2][ 阅读全文
posted @ 2024-10-22 18:16 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:胶过,唐 #include<bits/stdc++.h> using namespace std; int n,m; double a[100010]; struct node { double mx; int len; #define m(x) t[x].mx #define l(x) t[x]. 阅读全文
posted @ 2024-10-22 16:53 yzc_is_SadBee 阅读(6) 评论(0) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; inline int read(){int x=0;bool f=0;char ch=getchar();while (ch<'0'||ch>'9'){if (ch=='-') f=1;ch=getchar() 阅读全文
posted @ 2024-10-22 16:13 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:kmkmp #include<bits/stdc++.h> using namespace std; char str[1500005]; int n,kmp[1500005],cir[1500005],tms[30],suf[1500005],pre[2500005],per[27],cnt; l 阅读全文
posted @ 2024-10-22 15:44 yzc_is_SadBee 阅读(7) 评论(0) 推荐(0) 编辑
摘要:首先,这题最好的一个地方,在于它给出的关于next的讲解实在是妙极!!!!! 这题比我讲的好100倍! 赞美lg 捧lg的话到此为止,进入正文 题解 #include<bits/stdc++.h> using namespace std; const long long MOD=1e9+7; int 阅读全文
posted @ 2024-10-22 14:16 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:最后还是照着题解A了这道题…… #include <bits/stdc++.h> using namespace std; int n,m,s,t,edge_sum=1; int maxflow,mincost; int dis[5005],head[5005],incf[5005],pre[500 阅读全文
posted @ 2024-10-22 13:23 yzc_is_SadBee 阅读(6) 评论(0) 推荐(0) 编辑
摘要:oh dear #include<bits/stdc++.h> using namespace std; int n,k,m,s,t,a[105][105],wen[105]; int d[100005]; bool vis[100005]; int qi,mo,f; inline int read 阅读全文
posted @ 2024-10-22 11:39 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:酷狗没会员了QAQ #include<bits/stdc++.h> using namespace std; int n,m,f[1001],enm[1001]; int find(int x) { if(f[x]!=x) x=find(f[x]); return x; } void hebing( 阅读全文
posted @ 2024-10-22 11:16 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:终于把自己搞蒙了 简而言之,最小费用最大流就是这样: 图论中的一种理论与方法,研究网络上的一类最优化问题 。很多系统中涉及流量问题,例如公路系统中车流量,网络中的数据信息流,供油管道的油流量等。我们可以将有向图进一步理解为“流网络”(flow network),并利用这样的抽象模型求解有关流量的问题 阅读全文
posted @ 2024-10-21 20:47 yzc_is_SadBee 阅读(27) 评论(0) 推荐(0) 编辑
摘要:![](https://cdn.luogu.com.cn/upload/image_hosting/mif38k0x.png) 阅读全文
posted @ 2024-10-21 17:41 yzc_is_SadBee 阅读(6) 评论(0) 推荐(0) 编辑
摘要:<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"> <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-web 阅读全文
posted @ 2024-10-21 16:29 yzc_is_SadBee 阅读(66) 评论(0) 推荐(0) 编辑
摘要:没保存,CaO 抢救了一下,详见 my sol: A 打表。 1 I 2 II V X 3 III IV VI IX 4 VII 5 VIII 剩余的加X,再加2火柴即可 注意没有40! 完整: 1 I 2 II V X 3 III IV VI IX XI 4 VII XII XV XX 5 VII 阅读全文
posted @ 2024-10-21 16:22 yzc_is_SadBee 阅读(7) 评论(0) 推荐(0) 编辑
摘要:椒过 #include <bits/stdc++.h> using namespace std; int n,m,tot,lnk[505],ter[500005],nxt[500005],st[500005],ed[500005],deg[505]; double a[505][505],b[505 阅读全文
posted @ 2024-10-21 08:58 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:然而题单里就是有这题…… dij,照亮世界! #include<bits/stdc++.h> using namespace std; int n,k,m,s,t,a[105][105],wen[105]; int d[100005]; bool vis[100005]; int qi,mo,f; 阅读全文
posted @ 2024-10-21 08:34 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:暴搜+剪枝。 #include<bits/stdc++.h> using namespace std; struct f{ int rank,sum; }cou[10]; int a[10][10],hang[10][10],lie[10][10],gong[10][10],s[100][4],u, 阅读全文
posted @ 2024-10-21 08:06 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:A: 创历史新低 dalao:d<=5,所以一个位置上只能是[i-d,i+d],考虑状压 ljx's code #include <bits/stdc++.h> using namespace std; const int maxn=505; const int mod=998244353; int 阅读全文
posted @ 2024-10-20 19:26 yzc_is_SadBee 阅读(7) 评论(0) 推荐(0) 编辑
摘要:A: 这也能100 显然,完全图的三角形最多 易得n节点完全图中三角形数量为 Cn3 talk is cheap,show you the code #include <bits/stdc++.h> using namespace std; inline int read_z(){int x=0;c 阅读全文
posted @ 2024-10-20 18:46 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:这题治好了我的快读恐惧症,让我理解了cin的力量 cin,照亮世界! #include<bits/stdc++.h> using namespace std; const int inf=0x3f3f3f3f; int n,ans=-inf; int a[105]; int f[150][150], 阅读全文
posted @ 2024-10-16 19:43 yzc_is_SadBee 阅读(8) 评论(0) 推荐(0) 编辑
摘要:怎么这么多忘交的 一起发的原因还是vjudge #include<bits/stdc++.h> using namespace std; int read() { int x = 0; bool op = 0; char c = getchar(); while(!isdigit(c))op |= 阅读全文
posted @ 2024-10-15 20:18 yzc_is_SadBee 阅读(6) 评论(0) 推荐(0) 编辑
摘要:wc,模板exgcd! 甚至还交过 #include<bits/stdc++.h> using namespace std; long long x, y; void digui(long long a, long long b){ if(b == 0) { x = 1; y = 7; return 阅读全文
posted @ 2024-10-15 20:17 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:唐 #include<bits/stdc++.h> #define U(i,l,r) for(int i(l);i<=r;++i) #define D(i,r,l) for(int i(r);i>=l;--i) #define Huge_Int vector<long long> #define B 阅读全文
posted @ 2024-10-15 20:02 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:水题,一起切了 #include<bits/stdc++.h> using namespace std; int a[5000010]; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int n,k; cin>>n>>k; 阅读全文
posted @ 2024-10-14 20:20 yzc_is_SadBee 阅读(6) 评论(0) 推荐(0) 编辑
摘要:st表。(还是半懂不懂) #include <bits/stdc++.h> using namespace std; int n,m,x,y,l,a[100010],f[100010][20]; int main(){ cin>>n>>m; a[1]=0; for(int i=2;i<=n;i++) 阅读全文
posted @ 2024-10-14 20:20 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:把exgcd忘光了QAQ #include<bits/stdc++.h> using namespace std; long long ans,x1,y1; long long exgcd(long long a,long long b,long long &x1, long long &y1){ 阅读全文
posted @ 2024-10-14 18:44 yzc_is_SadBee 阅读(8) 评论(0) 推荐(0) 编辑
摘要:区间dp。 转移方程见题解(doge) #include<bits/stdc++.h> using namespace std; int m[310],dp[310][310],ans; int main() { ios::sync_with_stdio(0); cin.tie(NULL); cou 阅读全文
posted @ 2024-10-11 20:36 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:模板区间dp. 懒癌,于是把石子合并copy了一下。 #include<bits/stdc++.h> using namespace std; int m[310],dp[310][310],anss,ans; int main() { ios::sync_with_stdio(0); cin.ti 阅读全文
posted @ 2024-10-11 19:58 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:简单四维dp。 #include<bits/stdc++.h> using namespace std; int a[355],b,t[5],dp[45][45][45][45]; int main(){ ios::sync_with_stdio(0); cin.tie(NULL); cout.ti 阅读全文
posted @ 2024-10-11 19:13 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:补交。 #include<iostream> #include<cstdio> using namespace std; int g[105],f[105],a[105],s[105]; int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a 阅读全文
posted @ 2024-10-11 18:29 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:4维dp(因为n<=10) 就是二维dp+判断是否重复取 #include<bits/stdc++.h> using namespace std; int dp[15][15][15][15],a[15][15],x,y,z; int main() { ios::sync_with_stdio(0) 阅读全文
posted @ 2024-10-09 20:16 yzc_is_SadBee 阅读(5) 评论(0) 推荐(0) 编辑
摘要:没切 这题恶心的点死多…… 首先,你这数据不能一次性让我把bug改完吗?浪费lg评测资源,该罚 然后 进入正题 我踩的坑 两种机用同一个编号 中间会爆int,要在过程中就判掉 开头可能出现.这种毒瘤玩楞 然后比2023 csp-j T3 好写多了 #include<bits/stdc++.h> us 阅读全文
posted @ 2024-10-09 19:40 yzc_is_SadBee 阅读(3) 评论(0) 推荐(0) 编辑
摘要:交了锣鼓,但没交vjudge。 补交一下。 #include <iostream> using namespace std; void solve2(int n, int &y, int &m, int &d, bool flag) { static int todate[366][2]={{0,0 阅读全文
posted @ 2024-10-09 18:38 yzc_is_SadBee 阅读(2) 评论(0) 推荐(0) 编辑
摘要:dp 然而我们可以使用前缀和+暴搜,而且更好理解,同时复杂度约O(n2),能过 #include<bits/stdc++.h> using namespace std; int n,m,a[2505][2505],x[2505][2505],y[2505][2505],z[2505][2505],a 阅读全文
posted @ 2024-10-08 20:12 yzc_is_SadBee 阅读(7) 评论(0) 推荐(0) 编辑
摘要:赞美斯特勒(stl)。 #include <bits/stdc++.h> #define int long long using namespace std; priority_queue<int,vector<int>,greater<int> >q; signed main() { int n, 阅读全文
posted @ 2024-10-08 19:43 yzc_is_SadBee 阅读(3) 评论(0) 推荐(0) 编辑
摘要:终于想起来发博客了,呃呃呃呃呃呃 这题不难,但要看到 1≤L≤R<231和R−L≤106。 我们可以考虑先把<216的素数先筛出来,然后再把区间里的合数筛光。 然后……就没有然后了。 上代码: #include <bits/stdc++.h> #define int long long using 阅读全文
posted @ 2024-10-08 18:54 yzc_is_SadBee 阅读(3) 评论(0) 推荐(0) 编辑
摘要:又忘发博客了啊啊啊啊啊啊啊 马的遍历竟然现在才写…… 模板bfs。 #include<bits/stdc++.h> using namespace std; queue<int> _x,_y; int ma[405][405],dx,dy; int qx[8]={1,1,2,2,-1,-1,-2,- 阅读全文
posted @ 2024-10-07 20:03 yzc_is_SadBee 阅读(7) 评论(0) 推荐(0) 编辑
摘要:还好有题解,公式不用自己推了 #include<bits/stdc++.h> using namespace std; const int _G=3,mod=1004535809,Maxn=135000,MaxNum=10000500; long long powM(long long a,int 阅读全文
posted @ 2024-10-02 20:47 yzc_is_SadBee 阅读(5) 评论(1) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; int n,m,t,p,b[310000],tr[310000],d[310000],e[310000],g[310000],kk; char ch[100]; struct sth { int x,y,z,w 阅读全文
posted @ 2024-10-02 19:47 yzc_is_SadBee 阅读(6) 评论(0) 推荐(0) 编辑
摘要:卡特兰数 #include<bits/stdc++.h> using namespace std; long long mp[2000005],p[200005],cnt[2000005],r; long long qpow(long long a,long long b) { long long 阅读全文
posted @ 2024-10-02 19:29 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:如果不能越级打怪还叫什么主角 #include<bits/stdc++.h> namespace my_std { using namespace std; #define rep(i,x,y) for (int i=(x);i<=(y);i++) #define drep(i,x,y) for ( 阅读全文
posted @ 2024-10-02 19:18 yzc_is_SadBee 阅读(4) 评论(0) 推荐(0) 编辑
摘要:好久没发博客了(因为在家) 看到大家都是用后缀数组+莫队的,于是模仿题解搞了一搞 #include<bits/stdc++.h> using namespace std; int blk[200005]; struct ques { int l,r,id; inline friend bool op 阅读全文
posted @ 2024-10-02 18:48 yzc_is_SadBee 阅读(3) 评论(0) 推荐(0) 编辑