正文
增加 3 行删除 3 行
20 行未改动21222324252627282934 行未改动64656667686970717217 行未改动90919293949596979820 行未改动// Contest: Codeforces Round #854 by cybercats (Div. 1 + Div. 2)// URL: https://codeforces.com/contest/1799/problem/G// Memory Limit: 256 MB// Time Limit: 1000 ms//// Powered by CP Editor (https://cpeditor.org)//不回家了,我们去鸟巢!#include<bits/stdc++.h>34 行未改动for(int i=1; i<=n; ++i){tf[0]=1;int td=0;for(int z:v[i]){for(int j=td+1; j<=td+z; ++j) tf[j]=0;for(int k=td; k>=0; --k){17 行未改动}int ans=0;for(int i=0; i<=deg; ++i)if(i&1) ans=(ans+p-f[i]*fac[n-i]%p)%p;else ans=(ans+f[i]*fac[n-i])%p;printf("%lld\n",ans);return 0;}```20 行未改动21222324252627282934 行未改动64656667686970717217 行未改动90919293949596979820 行未改动// Contest: Codeforces Round #854 by cybercats (Div. 1 + Div. 2)// URL: https://codeforces.com/contest/1799/problem/G// Memory Limit: 256 MB// Time Limit: 1000 ms//// Powered by CP Editor (https://cpeditor.org)//不回家了,我们去鸟巢!#include<bits/stdc++.h>34 行未改动for(int i=1; i<=n; ++i){tf[0]=1;int td=0;for(int z:v[i]){for(int j=td+1; j<=td+z; ++j) tf[j]=0;for(int k=td; k>=0; --k){17 行未改动}int ans=0;for(int i=0; i<=deg; ++i)if(i&1) ans=(ans+p-f[i]*fac[n-i]%p)%p;else ans=(ans+f[i]*fac[n-i])%p;printf("%lld\n",ans);return 0;}```