# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
119988 | tutis | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++17 | 297 ms | 29256 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.
/*input
20
YYGYYYGGGGRGYYGRGRYG
*/
#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int code(char c)
{
if (c == 'R')
return 0;
if (c == 'G')
return 1;
return 2;
}
int main()
{
ios_base::sync_with_stdio(false);
int n;
string s;
cin >> n >> s;
vector<int>p[3];
for (int i = 0; i < n; i++)
p[code(s[i])].push_back(i);
int dp[p[0].size() + 2][p[1].size() + 2][p[2].size() + 2][3];
for (int k0 = 0; k0 <= (int)p[0].size(); k0++)
{
# | 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... |