# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
983762 | totoro | Robots (IOI13_robots) | C++17 | 191 ms | 65536 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 "robots.h"
#include <algorithm>
#include <unordered_set>
#include <vector>
const size_t MAX_SIZE_WEIGHT = 2000000001;
struct Robot;
struct Toy;
struct Robot {
std::vector<Toy*> cargo;
size_t weightLimit;
size_t sizeLimit;
Robot(size_t weightLimit, size_t sizeLimit) : weightLimit(weightLimit), sizeLimit(sizeLimit) {}
};
struct Toy {
std::vector<Robot*> carriers;
size_t weight;
size_t size;
Toy(size_t weight, size_t size) : weight(weight), size(size) {}
};
struct CompareRobots {
bool operator()(Robot* a, Robot* b) {
return a->cargo.size() <= b->cargo.size();
}
};
struct CompareToys {
Compilation message (stderr)
# | 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... |