# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
986486 | alexdd | Binaria (CCO23_day1problem1) | C++17 | 61 ms | 13136 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 int long long
const int MOD = 1e6+3;
int n,k;
int sum[1000005];
bool verif(int poz, int cur)
{
if(cur<0 || cur>1) return 0;
if(poz+k >= n) return 1;
///a[poz+k] - a[poz] = sum[poz+1] - sum[poz]
return verif(poz+k, sum[poz+1] - sum[poz] + cur);
}
int put(int a, int exp)
{
if(exp==0)
return 1;
if(exp%2==0)
return put(a*a%MOD,exp/2);
else
return put(a*a%MOD,exp/2)*a%MOD;
}
int comb(int x, int y)
{
if(x<y) return 0;
int aux1=1,aux2=1;
if(y<=x/2) y = x-y;
for(int i=y+1;i<=x;i++)
aux1 = aux1*i%MOD;
for(int i=1;i<=x-y;i++)
# | 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... |