标签:bsp pac class style names div gre its mit
#include<bits/stdc++.h> #define ll long long using namespace std; ll N,M,L; inline ll add(ll x,ll y){ x+=y; return x>=N?x-N:x;} inline ll mul(ll x,ll y){ ll an=0; for(;y;y>>=1,x=add(x,x)) if(y&1) an=add(an,x); return an; } inline ll ksm(ll x,ll y){ ll an=1; for(;y;y>>=1,x=mul(x,x)) if(y&1) an=mul(an,x); return an; } int main(){ scanf("%lld%lld%lld",&N,&M,&L),N++; printf("%lld\n",mul(L,ksm(N/2+1,M))); return 0; }
标签:bsp pac class style names div gre its mit
原文地址:https://www.cnblogs.com/JYYHH/p/8973322.html