# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
238442 | danikoynov | Trener (COCI20_trener) | C++14 | 270 ms | 10104 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 endl '\n'
using namespace std;
const int MAXN = 55, MAXK = 1510;
const long long mod = 1e9 + 7, base = 27;
int n, k;
long long dp[MAXN][MAXK];
string s[MAXN][MAXK];
pair < long long, long long > p[MAXN][MAXK];
long long full[MAXN][MAXK];
int main()
{
ios_base::sync_with_stdio(NULL);
cin.tie(NULL);
cout.tie(NULL);
cin >> n >> k;
for (int i = 1; i <= n; i ++)
for (int j = 1; j <= k; j ++)
{
cin >> s[i][j];
p[i][j].first = 0;
for (int d = 1; d < i; d ++)
{
p[i][j].first = (p[i][j].first * base + s[i][j][d - 1] - 'a' + 1) % mod;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |