19 lines
397 B
C++
19 lines
397 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace cpp26 {
|
|
|
|
struct Record {
|
|
std::string category;
|
|
int value;
|
|
};
|
|
|
|
[[nodiscard]] auto top_values_by_category(const std::vector<Record>& records, int min_value)
|
|
-> std::vector<Record>;
|
|
[[nodiscard]] auto total_by_category(const std::vector<Record>& records)
|
|
-> std::vector<std::pair<std::string, int>>;
|
|
|
|
} // namespace cpp26
|