# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
253784 | yanndev | Miners (IOI07_miners) | C++17 | 1219 ms | 100856 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |