Codeforces Round #419 (Div. 1), problem: (B) Karen and Test Solution In C/C++

By |2017-08-07T21:37:49+00:00August 7th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , , |

#include <cstdio> #include <iostream> #include <cstring> #include <cstdlib> using namespace std; #define ll long long const int N=200010; const ll M=1000000007ll; ll n,a[N],e[N],re[N]; ll suan(ll x,ll y){ ll t=1;while(y){if(y&1)t=t*x%M;x=x*x%M;y>>=1;}return t; } ll work(ll x,ll y){ if(y==0)return 1; return e[x]*re[x-y]%M*re[y]%M; } int main(void){ ll i; [...]