it's+a+red+and+yellow+butterfly改疑问句
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了it's+a+red+and+yellow+butterfly改疑问句相关的知识,希望对你有一定的参考价值。
参考技术A Is it a red and yellow butterfly?句子中有be动词,变一般疑问句是是直接把be动词提到句子开头 参考技术B Is it a red and yellow butterfly?
E - Red and Blue Graph(组合数学)
E - Red and Blue Graph(组合数学)
因为要求有偶数个不同颜色的边。
记不同颜色的边个数为 x x x,颜色全为红色的边个数为 y y y。
则红色的点度数之和为: 2 y + x = s 2y+x=s 2y+x=s
即 x , s x,s x,s 奇偶性相同。
而 s s s 的奇偶性,只取决于度数为奇数的红点个数。
因此枚举红色点中度数为奇数的个数即可,剩下在度数为偶数里选。
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const int N=2e5+10;
const ll mod=998244353;
int n,m,k,d[N],num[2];ll inv[N],fac[N],ans;
ll C(int n,int m)
if(n<m||m<0) return 0ll;
return fac[n]*inv[m]%mod*inv[n-m]%mod;
int main()
scanf("%d %d %d",&n,&m,&k);
for(int i=1,u,v;i<=m;i++)
scanf("%d %d",&u,&v),d[u]++,d[v]++;
fac[0]=inv[1]=inv[0]=1;
for(int i=1;i<=n;i++) fac[i]=fac[i-1]*i%mod;
for(int i=2;i<=n;i++) inv[i]=(mod-mod/i)*inv[mod%i]%mod;
for(int i=2;i<=n;i++) inv[i]=inv[i]*inv[i-1]%mod;
for(int i=1;i<=n;i++)
num[d[i]&1]++;
for(int i=0;i<=num[1];i+=2) //度数为奇数的个数必须为偶数个
ans=(ans+C(num[1],i)*C(num[0],k-i))%mod;
printf("%lld",ans);
以上是关于it's+a+red+and+yellow+butterfly改疑问句的主要内容,如果未能解决你的问题,请参考以下文章
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHO
追寻本源—— Cocoa's paintings and its related biblical sentences
Where is the bug and how is it fixed? an experiment with practitioner's
IO的详细解释:It's all about buffers: zero-copy, mmap and Java NIO
ERROR: Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot a