Submission #1180667

#TimeUsernameProblemLanguageResultExecution timeMemory
1180667user736482Growing Vegetable is Fun 3 (JOI19_ho_t3)C++20
Compilation error
0 ms0 KiB
#pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define ll int #define ld long double #define pb push_back #define ff first #define ss second #define MOD 1000000009 #define INF 1000000019 #define INFL 1000000009LL ll n,q,s,t,a,b,c,d,ans,bst,k,e,m,pier,h,w,u; char ch; ll dp[407][407][407][3]; vector<ll>v,pr[3]; ll gdzie[407][3];//gdzie ity jtego koloru int main() { ios_base::sync_with_stdio(0);cin.tie(0); cin>>n; pr[0].pb(0); pr[1].pb(0); pr[2].pb(0); for(ll i=0;i<n;i++){ cin>>ch; if(ch=='R') v.pb(0); else if(ch=='Y') v.pb(1); else v.pb(2); for(ll j =0;j<3;j++)pr[j].pb(pr[j].back()); pr[v.back()].back()++; gdzie[pr[v.back()].back()][v.back()]=i+1; }//return 0; for(ll i=0;i<=n+1;i++){ for(ll j=0;j<=n+1;j++){ for(ll k=0;k<3;k++){ dp[i][j][0][k]=INFL; dp[i][0][j][k]=INFL; dp[0][i][j][k]=INFL; } } }//return 0; for(ll i=1;i<=n+1;i++){ for(ll j=1;j<=n+1;j++){ for(ll k=1;k<=n+1;k++){ if(1==i && 1==j && 1==k){ continue; } for(ll l=0;l<3;l++){ dp[i][j][k][l]=INFL; ll pom; if(l==0)pom=i-1; else if(l==1)pom=j-1; else pom=k-1; if(l!=0){ dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1)); } if(l!=1){ dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1)); } if(l!=2){ dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1)); } //cout<<i<<" "<<j<<" "<<k<<" "<<l<<" "<<dp[i][j][k][l]<<"\n"; } } } } pr[0].back()++; pr[1].back()++; pr[2].back()++; if(min(dp[pr[0].back()][pr[1].back()][pr[2].back()][0],min(dp[pr[0].back()][pr[1].back()][pr[2].back()][2],dp[pr[0].back()][pr[1].back()][pr[2].back()][1]))>1000000000)cout<<-1; else cout<<min(dp[pr[0].back()][pr[1].back()][pr[2].back()][0],min(dp[pr[0].back()][pr[1].back()][pr[2].back()][2],dp[pr[0].back()][pr[1].back()][pr[2].back()][1])); }

Compilation message (stderr)

joi2019_ho_t3.cpp: In function 'int main()':
joi2019_ho_t3.cpp:60:98: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:98: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:98: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:98: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:98: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
joi2019_ho_t3.cpp:60:136: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:136: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:136: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:136: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:136: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
joi2019_ho_t3.cpp:60:174: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:174: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:174: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:174: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:60:174: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   60 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][0]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
joi2019_ho_t3.cpp:63:98: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:98: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:98: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:98: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:98: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
joi2019_ho_t3.cpp:63:136: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:136: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:136: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:136: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:136: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
joi2019_ho_t3.cpp:63:174: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:174: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:174: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:174: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:63:174: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   63 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][1]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
joi2019_ho_t3.cpp:66:98: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:98: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:98: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:98: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:98: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
joi2019_ho_t3.cpp:66:136: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:136: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:136: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:136: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:136: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                     ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
joi2019_ho_t3.cpp:66:174: error: no matching function for call to 'max(long long int, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type)'
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  254 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:254:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:174: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  300 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algobase.h:300:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:174: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'})
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3461:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
 3461 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3461:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:174: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   66 |                         dp[i][j][k][l]=min(dp[i][j][k][l],dp[i-(l==0)][j-(l==1)][k-(l==2)][2]+max(0LL,(ll)pr[1][gdzie[pom][l]]-j+1)+max(0LL,(ll)pr[2][gdzie[pom][l]]-k+1)+max(0LL,(ll)pr[0][gdzie[pom][l]]-i+1));
      |                                                                                                                                                                           ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/string:52,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from joi2019_ho_t3.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/11/bits/stl_algo.h:3467:5: note:   template argument deduction/substitution failed:
joi2019_ho_t3.cpp:66:174: note:   mismatched types 'std::initializer