# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
683762 | MtSaka | Ljetopica (COI19_ljetopica) | C++17 | 89 ms | 340 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;
using ll=long long;
static constexpr long long MOD=1000000007;
int main(){
int n,k;cin>>n>>k;
string s;cin>>s;
string a,b;cin>>a>>b;
//cerr<<n<<" "<<k<<endl;
//cerr<<s<<endl;
//cerr<<a<<" "<<b<<endl;
auto f=[&](const string&t)->ll {
//cerr<<t<<" "<<s<<endl;
array<vector<ll>,2>dp;
array<vector<ll>,2>sum;
dp[0]=vector<ll>(k+1,0);
dp[1]=vector<ll>(k+1,0);
sum[0]=vector<ll>(k+1,0);
sum[1]=vector<ll>(k+1,0);
if(t[0]=='1'){
dp[0][0]=1;
sum[0][0]=1;
}
else{
dp[1][0]=1;
sum[1][0]=1;
}
//for(int i=0;i<=k;i++)cerr<<dp[0][i]<<" \n"[i==k];
//for(int i=0;i<=k;i++)cerr<<dp[1][i]<<" \n"[i==k];
//cerr<<endl;
# | 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... |