#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "testlib.h" using namespace std; #define rep(i,n,c) for (int i=0;i using vec = vector; template using vvec = vec>; template using vvvec = vec>; using ll = long long; using pii = pair; using pll = pair; template bool chmin(T &a, T b){ if (a>b){ a = b; return true; } return false; } template bool chmax(T &a, T b){ if (a T sum(vec x){ T res=0; for (auto e:x){ res += e; } return res; } template void printv(vec x){ for (auto e:x){ cout<> play(N,vec(0)); for (int i=0;i0){ long double k = cnt[t]; standout[t] = (long double)(1/k); } if (t>0){ standout[t] += standout[t-1]; } } long double res; for (int i=0;i0){ res -= standout[s-1]; } } cout<