AtCoder Beginner Contest 156D |
您所在的位置:网站首页 › 141421什么意思 › AtCoder Beginner Contest 156D |
Time Limit: 2 sec / Memory Limit: 1024 MB Score : 400400 points Problem StatementAkari has nn kinds of flowers, one of each kind. She is going to choose one or more of these flowers to make a bouquet. However, she hates two numbers aa and bb, so the number of flowers in the bouquet cannot be aa or bb. How many different bouquets are there that Akari can make? Find the count modulo (109+7)(109+7). Here, two bouquets are considered different when there is a flower that is used in one of the bouquets but not in the other bouquet. Constraints All values in input are integers. 2≤n≤1092≤n≤109 1≤a=1; } return res%MOD; } ll C(ll n,ll m) { if(na>>b; ans=((pow(2ll,n)-C(n,a)-C(n,b)-1)%MOD+MOD)%MOD; cout>b; cout |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |