hiho week 158 register

Ended

Participants:330

Verdict:Accepted
Score:100 / 100
Submitted:2017-07-12 12:30:06

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
#include <cstdio>
int n, M=1000000007;
int main(){
    scanf("%d", &n);
    int a=1, b=1, c=1;
    for(int i=0;i<n;i++)
        a=(a+b)%M, a^=b^=a^=b, c=(c+c)%M;
    printf("%d\n", (c-b+M)%M);
    return 0;
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX