# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
559933 | Notred132 | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++17 | 485 ms | 769880 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 <iostream>
using namespace std;
const int maxn = 405;
int n;
char a[maxn];
int f[maxn][3][maxn][maxn];
int x[3][maxn];
int cnt[3];
int g[3][maxn][3];
int main()
{
ios_base::sync_with_stdio(NULL); cin.tie(nullptr);
cin >> n;
for(int i = 1; i <= n; ++i) cin >> a[i];
for(int i = 1; i <= n; ++i) {
if(a[i] == 'R') {
x[0][++cnt[0]] = i;
g[0][cnt[0]][1] = cnt[1];
g[0][cnt[0]][2] = cnt[2];
}
else if(a[i] == 'G') {
x[1][++cnt[1]] = i;
g[1][cnt[1]][0] = cnt[0];
g[1][cnt[1]][2] = cnt[2];
}
else {
x[2][++cnt[2]] = i;
g[2][cnt[2]][0] = cnt[0];
# | 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... |