|
|
@ -9,6 +9,7 @@ Result Day07::Task1() { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
delete tree; |
|
|
|
delete tree; |
|
|
|
|
|
|
|
|
|
|
|
return to_string(sum); |
|
|
|
return to_string(sum); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -25,6 +26,7 @@ Result Day07::Task2() { |
|
|
|
uint64_t result = *std::min_element(sizes.begin(), sizes.end()); |
|
|
|
uint64_t result = *std::min_element(sizes.begin(), sizes.end()); |
|
|
|
|
|
|
|
|
|
|
|
delete tree; |
|
|
|
delete tree; |
|
|
|
|
|
|
|
|
|
|
|
return to_string(result); |
|
|
|
return to_string(result); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -129,3 +131,8 @@ uint64_t File::getSize() { |
|
|
|
uint64_t Item::getSize() { |
|
|
|
uint64_t Item::getSize() { |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Dir::~Dir(){ |
|
|
|
|
|
|
|
for (Item* item : items) |
|
|
|
|
|
|
|
delete item; |
|
|
|
|
|
|
|
} |
|
|
|