This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
int add (int a, int b) {
a += b; if (a >= MOD) a -= MOD;
return a;
}
int sub (int a, int b) {
a -= b; if (a < 0) a += MOD;
return a;
}
int mul (int a, int b) {
return (a * 1ll * b) % MOD;
}
int power (int a, int b) {
if (!b) return 1;
int u = power(a, b >> 1);
u = mul(u, u);
if (b & 1) u = mul(u, a);
return u;
}
typedef complex <int> P;
#define X real()
#define Y imag()
int cross (P a, P b) {
return (conj(a) * b).Y;
}
int intersect (P x, P a, P b) {
if (cross(x - a, x - b) > 0) return 1;
if (cross(x - a, x - b) < 0) return -1;
return 0;
}
int n;
P arr[1001];
int main () {
cin >> n;
for (int i = 0; i < n; i++) {
int a, b; cin >> a >> b;
arr[i] = {a, b};
}
cout << mul(n, power(2, n - 1)) << '\n';
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |