# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1038891 | vjudge1 | Binaria (CCO23_day1problem1) | C++17 | 137 ms | 18880 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>
#define int long long
#define vi vector <int>
#define bs binary_search
#define lb lower_bound
#define ub upper_bound
#define pb emplace_back
#define fu(i, a, b) for(int i = (a); i < (b); i++)
#define fub(i, a, b) for(int i = (a); i <= (b); i++)
#define pii pair<int, int>
#define fastio ios_base::sync_with_stdio(0); cin.tie(0);
using namespace std;
const int lim = 1e18;
const int N = 1e6 + 3;
const int M = 1e9 + 7;
int n, k, res;
int a[N], mp[N];
int expo(int a, int b){
if(b == 0)return 1;
if(b%2 == 0)return expo((a*a)%N, b/2)%N;
return (a*expo((a*a)%N, b/2))%N;
}
int bico(int n, int k){
if(k > n or n < 0 or k < 0)return 0;
int res = 1;
fub(i, k+1, n)res = (res*i)%N;
fub(i, 1, n-k)res = (res*expo(i, N-2))%N;
return res;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |