This documentation is automatically generated by online-judge-tools/verification-helper
#include "tools/counter.hpp"#pragma once
#include "./base.hpp"
#include <map>
namespace matumoto {
template <typename Iterator>
auto counter(Iterator first, Iterator last) {
using T = remove_reference_t<decltype(*first)>;
map<T, int> res;
for (auto it = first; it != last; it++) {
T value = *it;
res[value]++;
}
return res;
}
} // namespace matumoto#line 2 "tools/counter.hpp"
#line 2 "tools/base.hpp"
namespace matumoto {
using namespace std;
}
#line 4 "tools/counter.hpp"
#include <map>
namespace matumoto {
template <typename Iterator>
auto counter(Iterator first, Iterator last) {
using T = remove_reference_t<decltype(*first)>;
map<T, int> res;
for (auto it = first; it != last; it++) {
T value = *it;
res[value]++;
}
return res;
}
} // namespace matumoto