Submission #117760

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1177602019-06-17 07:34:02JohnTitorGrowing Vegetable is Fun 3 (JOI19_ho_t3)C++11
0 / 100
2 ms384 KiB
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, j, k) for(int i=(j); i<=(k); i++)
#define FFOR(i, j, k) for(int i=(j); i<(k); i++)
#define DFOR(i, j, k) for(int i=(j); i>=(k); i--)
#define bug(x) cerr<<#x<<" = "<<(x)<<'\n'
#define pb push_back
#define mp make_pair
#define bit(s, i) (((s)>>(i))&1LL)
#define mask(i) ((1LL<<(i)))
#define builtin_popcount __builtin_popcountll
#define __builtin_popcount __builtin_popcountll
using ll=long long; using ld=long double;
mt19937_64 rng(chrono::high_resolution_clock::now().time_since_epoch().count()); const ld pi=acos(0)*2;
template <typename T> inline void read(T &x){char c; bool nega=0; while((!isdigit(c=getchar()))&&(c!='-')); if(c=='-'){nega=1; c=getchar();} x=c-48; while(isdigit(c=getchar())) x=x*10+c-48; if(nega) x=-x;}
template <typename T> inline void writep(T x){if(x>9) writep(x/10); putchar(x%10+48);}
template <typename T> inline void write(T x){if(x<0){ putchar('-'); x=-x;} writep(x);}
template <typename T> inline void writeln(T x){write(x); putchar('\n');}
#define taskname "Vegetable3"
int n;
string s;
int cnt[256];
int x[3][401][3];
int f[401][201][134][3];
bool done[401][201][134][3];
int F(int c0, int c1, int c2, int l){
if(done[c0][c1][c2][l]) return f[c0][c1][c2][l];
done[c0][c1][c2][l]=1;
if(c0+c1+c2==0) return f[c0][c1][c2][l]=0;
int res=1e9;
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

joi2019_ho_t3.cpp: In function 'int main()':
joi2019_ho_t3.cpp:45:25: warning: array subscript has type 'char' [-Wchar-subscripts]
     for(char c: s) cnt[c]++;
                         ^
joi2019_ho_t3.cpp: In lambda function:
joi2019_ho_t3.cpp:47:21: warning: array subscript has type 'char' [-Wchar-subscripts]
         return cnt[A]>cnt[B];
                     ^
joi2019_ho_t3.cpp:47:28: warning: array subscript has type 'char' [-Wchar-subscripts]
         return cnt[A]>cnt[B];
                            ^
joi2019_ho_t3.cpp: In function 'int main()':
joi2019_ho_t3.cpp:53:14: warning: array subscript has type 'char' [-Wchar-subscripts]
         cnt[c]++;
              ^
joi2019_ho_t3.cpp:54:26: warning: array subscript has type 'char' [-Wchar-subscripts]
         FFOR(i, 0, 3) x[c][cnt[c]][i]=cnt[i];
                          ^
joi2019_ho_t3.cpp:54:33: warning: array subscript has type 'char' [-Wchar-subscripts]
         FFOR(i, 0, 3) x[c][cnt[c]][i]=cnt[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...