ivy吖

关注

【Luogu3414】SAC#1 - 组合数

ivy吖

关注

阅读 29

2023-02-08


problem

solution

codes

#include<iostream>
#define mod 6662333
using namespace std;
typedef long long LL;
LL dfs(LL a, LL b, LL p){
if(b==1)return a%p;
LL t = dfs(a,b>>1,p)%p;
if(b%2==0)return t*t%p;
else return t*t*a%p;
}
int main(){
LL n; cin>>n;
cout<<dfs(2,n-1,mod);
return 0;
}


相关推荐

把平平凡凡的生活过成诗与远方

P3414 SAC#1 - 组合数(C n0​ +C n1​ +C n2​ +...+C nn​ =2 n )

把平平凡凡的生活过成诗与远方 61 0 0

晗韩不普通

洛谷P3413 SAC#1 - 萌数 题解 数位DP

晗韩不普通 30 0 0

_刘彦辉

组合数

_刘彦辉 57 0 0

迎月兮

【Luogu3931】SAC E#1 - 一道难题 Tree

迎月兮 25 0 0

郝春妮

bzoj4870&luogu3746 [六省联考2017]组合数问题

郝春妮 59 0 0

时光已翩然轻擦

【Luogu3929】SAC E#1 - 一道神题 Sequence1

时光已翩然轻擦 24 0 0

_阿瑶

组合数问题

_阿瑶 38 0 0

西特张

【Luogu3926】SAC E#1 - 一道不可做题 Jelly

西特张 21 0 0

624c95384278

【组合数】模板

624c95384278 71 0 0

TiaNa_na

1090 组合数

TiaNa_na 175 0 0

精彩评论(0)

0 0 举报