#include #include #include using namespace std; struct greater { template bool operator()(T const &a, T const &b) const { return a > b; } }; int main() { freopen ("toys.in", "r", stdin); freopen ("toys.out", "w" , stdout); int N, M, a; scanf("%d %d", &N, &M); int n[N]; for(int i=0;i