# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1162698 | AndreasK | Counting Mushrooms (IOI20_mushrooms) | C++20 | 1 ms | 420 KiB |
#include <bits/stdc++.h>
#include "mushrooms.h"
using namespace std;
/*static char fmt_buffer[100000];
#define FMT_TO_STR(fmt, result) va_list vargs; va_start(vargs, fmt); \
vsnprintf(fmt_buffer, sizeof(fmt_buffer), fmt, vargs); \
va_end(vargs); fmt_buffer[sizeof(fmt_buffer)-1] = 0; \
std::string result(fmt_buffer);
static const int min_n = 2;
static const int max_n = 20000;
static const int max_qc = 20000;
static const int max_qs = 100000;
static const int species_A = 0;
static const int species_B = 1;
static int n;
static std::vector<int> species;
static int qc, qs;
static inline void error_if(bool cond, std::string message) {
if (cond) {
printf("%s\n", message.c_str());
exit(0);
}
}
static inline void wrong_if(bool cond, std::string message) {
error_if(cond, "Wrong Answer: "+message);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |