I- TeamsTime
limit:MS
Memory Limit:0KB
64bit IO format:< /c7>%lld &%llu SubmitStatusPractice UVA 11609
Test Instructions: There are n individuals, choose more people to participate in the competition, one of them is the captain, the captain different from other players also counted as different programs. Ask you how many kinds of programs there are altogether. idea: Oneself only a little reasoning on paper, n*2
n-1%mod; Reprint Please specify the Source:Looking for Children & stars Topic Links:UVA 11609 Also welcome to me to open the topic brush question. Haha http://acm.hust.edu.cn/vjudge/contest/view.action?cid=77956#overview
#include <stdio.h> #define MOD 1000000007#define ll long longll Ppow (ll x,ll N) { ll tp=1; while (n) { if (n&1) tp=tp*x%mod; n>>=1; X=x*x%mod; } return TP;} int main () { int ca=1,t; scanf ("%d", &t); LL N; while (ca<=t) { scanf ("%lld", &n); printf ("Case #%d:%lld\n", ca++, (N*ppow (2,n-1))%mod); } return 0;}
Teams (uva11609+ combination)