# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
751423 | Username4132 | Ljetopica (COI19_ljetopica) | C++14 | 18 ms | 11340 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<iostream>
using namespace std;
using ll = long long;
#define forn(i, n) for(int i=0; i<(int)n; ++i)
#define forsn(i, s, n) for(int i=s; i<(int)n; ++i)
const int MAXN=1010, MOD=1000000007;
int n, k, pot[MAXN], comb[MAXN][MAXN], dp[MAXN][MAXN][2];
string dirs, le, ri;
void pre(string& num){
int pos=num.size()-1;
while(num[pos]=='0') num[pos--]='1';
num[pos]='0';
}
void nxt(string& num){
int pos=num.size()-1;
while(pos>0 && num[pos]=='1') num[pos--]='0';
num[pos]='1';
}
bool allEq(string& num, char ch){
bool ret=true;
for(char c:num) ret&=(c==ch);
return ret;
}
int calc(string num){
int ret=0;
# | 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... |