#include using namespace std; typedef long long ll; #define rep(i,n) for(int i=0;i>p>>q; p1=(1-p)*q; p2=p*(1-q)*(1-q); if(p1