Submission #253784

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2537842020-07-28 16:58:10yanndevMiners (IOI07_miners)C++17
100 / 100
1219 ms100856 KiB
#include <iostream>
#include <set>
#include <map>
const int MAX_FOOD = 1e5 + 1;
const int NO_FOOD = 0;
const int INF = 1e9;
int dp[MAX_FOOD][4][4][4][4];
std::map<char, int> foodToInt {{'F', 1}, {'M', 2}, {'B', 3}};
int score(int a, int b, int c) {
std::set<int> vals {a, b, c};
vals.erase(0);
return vals.size();
}
int main() {
int n_delivery;
int ans = 0;
std::string deliveries;
std::cin >> n_delivery >> deliveries;
for (int i = 0; i <= n_delivery; i++)
for (int lastFoodM11 = 0; lastFoodM11 < 4; lastFoodM11++)
for (int lastFoodM12 = 0; lastFoodM12 < 4; lastFoodM12++)
for (int lastFoodM21 = 0; lastFoodM21 < 4; lastFoodM21++)
for (int lastFoodM22 = 0; lastFoodM22 < 4; lastFoodM22++)
dp[i][lastFoodM11][lastFoodM12][lastFoodM21][lastFoodM22] = -INF;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...