Submission #866783

#TimeUsernameProblemLanguageResultExecution timeMemory
866783TAhmed33Kućice (COCI21_kucice)C++98
0 / 110
277 ms524288 KiB
#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[101]; 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...