#include using std::cin, std::cout, std::iostream; constexpr size_t MAX_N {(size_t)5e4+5}; int n, arr[MAX_N], len[MAX_N], ans1, ans2; int main(){ iostream::sync_with_stdio(false), cin.tie(0), cout.tie(0); cin>>n; for(size_t i=0;i>arr[i]; } }