#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define popcount __builtin_popcount using namespace std; typedef long long int ll; typedef pair P; int main() { int n; ll x, y; cin>>n>>x>>y; ll a[200020], s[200020]; s[0]=0; for(int i=0; i>a[i]; } for(int i=0; i1) s1[i]=min(s1[i], s1[i-1]); } reverse(a, a+n); s[0]=0; for(int i=0; i1) s2[i]=min(s2[i], s2[i-1]); } for(int i=2; i