#include <iostream>
#include <type_traits>
#include <vector>
#include <memory>
using namespace std;
int main() {
vector<vector<int>> mySol = {{3,1},{1,2},{4,5},{1,3},{1,2}};
auto minIt = std::min(mySol.begin(), mySol.end());
cout << (*minIt)[0] << endl;
int nShortest = 0;
for (auto it = mySol.begin(); it != mySol.end(); ++it) {
if ((*it)[0] == (*minIt)[0]) ++nShortest;
}
cout << nShortest << " ";
for (auto it = mySol.begin(); it != mySol.end(); ++it) {
if ((*it)[0] == (*minIt)[0]) {
cout << (*it)[1] << " ";
}
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dHlwZV90cmFpdHM+CiNpbmNsdWRlIDx2ZWN0b3I+CiNpbmNsdWRlIDxtZW1vcnk+Cgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CiAgICB2ZWN0b3I8dmVjdG9yPGludD4+IG15U29sID0ge3szLDF9LHsxLDJ9LHs0LDV9LHsxLDN9LHsxLDJ9fTsKICAgIGF1dG8gbWluSXQgPSBzdGQ6Om1pbihteVNvbC5iZWdpbigpLCBteVNvbC5lbmQoKSk7CiAgICBjb3V0IDw8ICgqbWluSXQpWzBdIDw8IGVuZGw7CiAgICAKICAgIGludCBuU2hvcnRlc3QgPSAwOwogICAgZm9yIChhdXRvIGl0ID0gbXlTb2wuYmVnaW4oKTsgaXQgIT0gbXlTb2wuZW5kKCk7ICsraXQpIHsKICAgICAgICBpZiAoKCppdClbMF0gPT0gKCptaW5JdClbMF0pICsrblNob3J0ZXN0OwogICAgfQogICAgY291dCA8PCBuU2hvcnRlc3QgPDwgIiAiOwogICAgCiAgICBmb3IgKGF1dG8gaXQgPSBteVNvbC5iZWdpbigpOyBpdCAhPSBteVNvbC5lbmQoKTsgKytpdCkgewogICAgICAgIGlmICgoKml0KVswXSA9PSAoKm1pbkl0KVswXSkgewogICAgICAgICAgICBjb3V0IDw8ICgqaXQpWzFdIDw8ICIgIjsKICAgICAgICB9CiAgICB9Cn0K