# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
256394 | Saboon | Vim (BOI13_vim) | C++14 | 629 ms | 98936 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;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
const int maxn = 5000 + 10;
int nex[maxn][12];
int dp[maxn][maxn];
int pd[maxn];
int main(){
ios_base::sync_with_stdio(false);
int n;
string s;
cin >> n >> s;
for (int i = 0; i < 10; i++){
int last = -1;
for (int j = n-1; j >= 0; j--){
if (last == -1)
nex[j][i] = j;
else
nex[j][i] = last;
if ((int)(s[j] - 'a') == i and s[j] != 'e')
last = j;
}
}
vector<int> e;
for (int i = 0; i < n; i++)
if (s[i] == 'e')
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |