# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
674452 | Johann | Vim (BOI13_vim) | C++14 | 32 ms | 10568 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;
typedef vector<int> vi;
typedef vector<vi> vvi;
#define all(x) (x).begin(), (x).end()
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
string s;
cin >> s;
// Init Jumpings
vvi next_loc(n, vi(10, n));
int cntE = 0; // der letzte und erste Buchstabe sind != 'e'
for (int i = n - 2; i >= 0; --i)
{
for (int c = 0; c < 10; ++c)
next_loc[i][c] = next_loc[i + 1][c];
next_loc[i][s[i + 1] - 'a'] = i + 1;
if (s[i + 1] == 'e')
++cntE;
}
// make dp
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |