# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
895998 | alexander707070 | Copy and Paste 3 (JOI22_copypaste3) | C++14 | 1281 ms | 451692 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 MAXN 37
using namespace std;
const long long inf=1e15;
const long long mod=1000000000100011;
int n;
long long a,b,c;
char s[MAXN];
long long dp[MAXN][MAXN][MAXN][MAXN][2*MAXN];
bool li[MAXN][MAXN][MAXN][MAXN][2*MAXN];
long long hesh(int l,int r){
long long res=0;
for(int i=l;i<=r;i++){
res*=26; res+=s[i]-'a';
res%=mod;
}
return res;
}
long long ff(int l,int r,int ll,int rr,int step){
if(step>2*n)return inf;
if(l==1 and r==n)return 0;
if(li[l][r][ll][rr][step])return dp[l][r][ll][rr][step];
li[l][r][ll][rr][step]=true;
dp[l][r][ll][rr][step]=inf;
# | 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... |