该文被密码保护。 阅读全文
摘要:
思路: 设1为向(1,1)方向走,0为向(1,-1)方向走。那么题意可转化为从(0,0)走到(n+m,n-m)且不能跨过y=0的方案数。总方案数C(n+m,n),然后要减去不合法的即线路通过y=-1的。将线路与y=-1交点的左边沿着y=-1做对称操作,则最后等价于从(0,-2)走到(n+m,n-m) 阅读全文
摘要:
//point(AB)->point(CD) 距离满足下凸性,用三分套三分实现 #include #include #include #define pf(x) ((x)*(x)) using namespace std; typedef double real; const real eps=1e-4; real ax,ay,bx,by,cx,cy,dx,dy,P,Q,R,ans; i... 阅读全文
摘要:
#include<cstdio> #include<iostream> #define lc k<<1 #define rc k<<1|1 using namespace std; const int N=1e5+5; int n,m,a[N]; struct sgt{ int sum,tag,re 阅读全文