Submission #1008019

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10080192024-06-26 06:06:24vjudge1Miners (IOI07_miners)C++17
100 / 100
935 ms245116 KiB
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
using namespace std;
const int N = 2e5+1;
int localchecker = 0;
int n;
string s;
int dp[N][5][5][5][5];
int dis(int x, int y, int z) {
set<int> cc = {x,y,z};
return cc.size();
}
#define chmax(x, y) x = max(x, y);
int main()
{
ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
cin >> n >> s;
if (n <= 20) {
int sol = 0;
for (int msk = 0; msk < (1 << n); msk++) {
int coal = 0;
vector<int> fr, sc;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

miners.cpp: In function 'int main()':
miners.cpp:75:23: warning: array subscript has type 'char' [-Wchar-subscripts]
   75 |       chmax(dp[i][s[i]][p1][p3][p4],
      |                       ^
miners.cpp:20:21: note: in definition of macro 'chmax'
   20 | #define chmax(x, y) x = max(x, y);
      |                     ^
miners.cpp:75:23: warning: array subscript has type 'char' [-Wchar-subscripts]
   75 |       chmax(dp[i][s[i]][p1][p3][p4],
      |                       ^
miners.cpp:20:29: note: in definition of macro 'chmax'
   20 | #define chmax(x, y) x = max(x, y);
      |                             ^
miners.cpp:77:31: warning: array subscript has type 'char' [-Wchar-subscripts]
   77 |       chmax(dp[i][p1][p2][s[i]][p3],
      |                               ^
miners.cpp:20:21: note: in definition of macro 'chmax'
   20 | #define chmax(x, y) x = max(x, y);
      |                     ^
miners.cpp:77:31: warning: array subscript has type 'char' [-Wchar-subscripts]
   77 |       chmax(dp[i][p1][p2][s[i]][p3],
      |                               ^
miners.cpp:20:29: note: in definition of macro 'chmax'
   20 | #define chmax(x, y) x = max(x, y);
      |                             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...