#include using namespace std; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>p; D ans=0; const int MAX = 1e7; D res=1-p; for(int i=0;i