# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
98254 | scanhex | Growing Vegetable is Fun 3 (JOI19_ho_t3) | C++17 | 275 ms | 164048 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;
using nagai = long long;
#define sz(x) int((x).size())
vector<int>occ[3];
const int N=404;
int dp[N][N][N][3];
#define chmi(x,y) x=min(x,y)
const int oo=0x3f3f3f3f;
int prec[3][3][N][N];
int main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin>>n;
string s;
cin>>s;
for(int i=0;i<n;++i){
if(s[i]=='R')occ[0].push_back(i);
if(s[i]=='G')occ[1].push_back(i);
if(s[i]=='Y')occ[2].push_back(i);
}
// memset(dp,0x3f,sizeof dp);
int arr[3];
for(arr[0]=0;arr[0]<=occ[0].size();++arr[0])
for(arr[1]=0;arr[1]<=occ[1].size();++arr[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... |