#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; bool rcmp(int a, int b) { return a>b; } typedef long long LL; #define MOD 1000000007 int xs[100004]; int expit(LL b, LL e) { LL r=1; while(e) { if (e&1) { r*=b; r%=MOD; } b*=b; b%=MOD; e>>=1; } return r; } int main() { int n, i; LL s=0, r=0, t1, t2, t, c; scanf("%d", &n); for (i=0; i