# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
101888 | brcode | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++14 | 290 ms | 196824 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>
#include <vector>
using namespace std;
const int inf = 1e9;
int dp[3][410][410][410];
int cnt[3][410];
int a[450];
vector<int> col[3];
int main(){
int n;
cin>>n;
string s;
cin>>s;
for(int i=0;i<n;i++){
if(s[i] == 'R'){
a[i+1] = 0;
}else if(s[i] == 'G'){
a[i+1] = 1;
}else{
a[i+1] = 2;
}
}
col[0].push_back(0);
col[1].push_back(0);
col[2].push_back(0);
for(int i=1;i<=n;i++){
for(int j=0;j<3;j++){
cnt[j][i] = cnt[j][i-1];
}
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... |