# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
868919 | Cyber_Wolf | Magneti (COCI21_magneti) | C++17 | 279 ms | 199848 KiB |
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;
#define lg long long
const lg N = 2e5+5, MOD = 1e9+7;
lg v[N], fact[N];
lg fast_power(lg n, lg k)
{
lg ans = 1;
while(k)
{
if((k&1))
{
ans = (ans*n)%MOD;
}
n = (n*n)%MOD;
k >>= 1;
}
return ans;
}
lg C(lg n, lg r)
{
lg ans = fact[n];
ans = (ans*fast_power(fact[r], MOD-2))%MOD;
ans = (ans*fast_power(fact[n-r], MOD-2))%MOD;
# | 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... |