// Source: https://usaco.guide/general/io #include #include using namespace std; typedef unsigned long long ull; typedef long long ll; typedef vector vi; typedef pair ii; typedef vector vii; typedef long double ld; typedef pair pll; #define FOR(i, a, b) for(int i = a; i < b; i++) #define ROF(i, a, b) for(int i = a; i >= b; i--) #define ms memset #define pb push_back #define fi first #define se second #define inp(n, a) vector a;for(int i=0;i>now;a.pb(now);} #define all(a) a.begin(),a.end() #define show(a) for(long long loppls=0;loppls<(long long)(a.size()-1);loppls++)cout< 0) { if (b & 1) res = res * a % m; a = a * a % m; b >>= 1; } return res; } ll sum2(ll a, ll l, ll n){return (n*(a+l))/2;} ll ceil2(ll a, ll b){return (a+b-1)/b;} const long long INF=1e16,MAX=200020,MOD=998244353; void solve() { ll n,x;cin>>n>>x; inp(n,a); ll dp[n]; ll sum=0,tail=0,oops=1; for(int i=0;i