标签:enter efi line 个数 pre int rip problems ios
【数据范围】
对于30%的数据,保证1<=m<=n<=1000
对于100%的数据,保证1<=m<=n<=1000000
详见http://www.cnblogs.com/ezyzy/p/6532599.html
证明一样
1 #include<iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 #define ll long long 6 #define N 2000005 7 using namespace std; 8 int n,m; 9 int jie[N]; 10 const int p = 20100403; 11 int pw(int x,int y) 12 { 13 ll lst=1; 14 while(y) 15 { 16 if(y&1)lst=lst*x%p; 17 y>>=1; 18 x=(1LL*x*x)%p; 19 } 20 return lst; 21 } 22 int main() 23 { 24 scanf("%d%d",&n,&m); 25 jie[0]=1; 26 for(int i=1;i<=n+m;i++)jie[i]=(1LL*jie[i-1]*i)%p; 27 ll ans=1LL*jie[n+m]*pw(jie[n],p-2)%p*pw(jie[m],p-2)%p-1LL*jie[n+m]*pw(jie[n+1],p-2)%p*pw(jie[m-1],p-2)%p; 28 ans=(ans+p)%p; 29 printf("%lld\n",ans); 30 return 0; 31 }
标签:enter efi line 个数 pre int rip problems ios
原文地址:http://www.cnblogs.com/ezyzy/p/6532658.html