# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
596396 | Deepesson | Peru (RMI20_peru) | C++17 | 1 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>
#define MAX 2005
int solve(int n, int k, int* v);
using ll = long long;
ll inf = 1LL<<60LL;
ll dp[MAX];
int N,K;
ll array[MAX];
ll MOD = 1e9+7;
ll expo[MAX];
ll gera_hash(void){
ll hash = 0;
for(int i=0;i!=N;++i){
hash = (hash + (dp[i]*expo[N-1-i]))%MOD;
}
return hash;
}
int solve(int n, int k, int* array){
N=n;
K=k;
expo[0]=1;
for(int i=1;i!=MAX;++i)expo[i]=(23LL*expo[i-1])%MOD;
for(auto&x:dp)x=inf;
{
ll max=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... |