proconlib

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub KodamaD/proconlib

:warning: utility/dedup.cpp

Code

#pragma once
#include <algorithm>
#include <vector>

template <class T> int dedup(std::vector<T>& vec) {
    std::sort(vec.begin(), vec.end());
    vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
    return vec.size();
}
#line 2 "utility/dedup.cpp"
#include <algorithm>
#include <vector>

template <class T> int dedup(std::vector<T>& vec) {
    std::sort(vec.begin(), vec.end());
    vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
    return vec.size();
}
Back to top page