remove bad using

This commit is contained in:
Adam Jeniski 2025-12-13 19:14:05 -10:00
parent 4aca0f39cb
commit a1ab4d590f

View File

@ -10,25 +10,23 @@ struct Data {
int64_t max;
};
using std::cout, std::endl, std::vector, std::ifstream;
int64_t part_1(const vector<Data> &);
int64_t part_2(const vector<Data> &);
int64_t part_1(const std::vector<Data> &);
int64_t part_2(const std::vector<Data> &);
int main() {
ifstream file{"input/2025-2.txt"};
std::ifstream file{"input/2025-2.txt"};
Data line;
char throwaway;
vector<Data> v;
std::vector<Data> v;
while (file >> line.min >> throwaway >> line.max) {
v.push_back(line);
file >> throwaway;
}
cout << "Part 1: " << part_1(v) << endl;
cout << "Part 2: " << part_2(v) << endl;
std::cout << "Part 1: " << part_1(v) << std::endl;
std::cout << "Part 2: " << part_2(v) << std::endl;
}
int64_t part_1(const vector<Data> &v) {
int64_t part_1(const std::vector<Data> &v) {
int64_t answer{0};
for (auto d : v) {
for (auto n{d.min}; n <= d.max; ++n) {
@ -61,7 +59,7 @@ int64_t solve_n(int64_t n) {
return 0;
}
int64_t part_2(const vector<Data> &v) {
int64_t part_2(const std::vector<Data> &v) {
int64_t ans{0};
for (auto d : v) {
for (auto n{d.min}; n <= d.max; ++n) {