Submission #101888

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1018882019-03-20 18:39:25brcodeGrowing Vegetable is Fun 3 (JOI19_ho_t3)C++14
100 / 100
290 ms196824 KiB
#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];
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

joi2019_ho_t3.cpp: In function 'int main()':
joi2019_ho_t3.cpp:64:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                      if(col[i].size()<=c[i]+1||last == i){
                         ~~~~~~~~~~~~~^~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...