# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
108751 | tictaccat | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++14 | 384 ms | 192932 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;
const int INF = 1e9;
const int MAX = 400+2;
int N;
string S;
int dp[3][MAX][MAX][MAX];
int cross[MAX][MAX][MAX];
vector<int> R,G,Y;
int main() {
cin >> N >> S;
for (int i = 0; i < N; i++) {
if (S[i] == 'R') R.push_back(i);
else if (S[i] == 'G') G.push_back(i);
else Y.push_back(i);
}
for (int r = 0; r <= R.size(); r++) {
for (int g = 0; g <= G.size(); g++) {
for (int y = 0; y <= Y.size(); y++) {
int i = r+g+y;
for (int c = 0; c < 3; c++) {
Compilation message (stderr)
# | 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... |