#include <iostream>
#include <algorithm>
int main() {
int a[] = {2, 1, 2, 3, 4};
std::nth_element(a, a+2, a+5);
std::cout << a[1];
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgoKaW50IG1haW4oKSB7CglpbnQgYVtdID0gezIsIDEsIDIsIDMsIDR9OwoJc3RkOjpudGhfZWxlbWVudChhLCBhKzIsIGErNSk7CglzdGQ6OmNvdXQgPDwgYVsxXTsKCXJldHVybiAwOwp9