# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
633477 | Ooops_sorry | Homework (CEOI22_homework) | C++14 | 141 ms | 126460 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 rnd(51);
#define ll long long
#define pb push_back
#define ld long double
const int INF = 1e9;
string s;
vector<int> go;
int n;
int solve(int l, int r) {
if (s[l] == '?') {
return 1;
}
int i = go[l + 3];
if (s[l + 1] == 'a') {
return min(solve(l + 4, i - 1), solve(i + 1, r - 1));
} else {
return solve(l + 4, i - 1) + solve(i + 1, r - 1);
}
}
int solve2(int l, int r) {
if (s[l] == '?') {
return 1;
# | 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... |