
容斥
文章平均质量分 84
乌拉尔银狼
这个作者很懒,什么都没留下…
展开
-
【容斥】Four-tuples @山东省第九届省赛 F
(施工)#define IN_LB() freopen("C:\\Users\\acm2018\\Desktop\\in.txt","r",stdin)#define OUT_LB() freopen("C:\\Users\\acm2018\\Desktop\\out.txt","w",stdou原创 2018-05-12 13:40:49 · 608 阅读 · 3 评论 -
【map离散&容斥】Ghosts @Codeforces Round #478 (Div. 2) D
传送门 题意:给你一条直线的斜率a和截距b,和某一时刻n个在直线上的点的横坐标,以及沿坐标轴方向的速度。问你这些点在(-∞,+∞)的时间内的碰撞次数。solution 设两个点在t时刻相碰,有: x1+vx1t=x2+vx2tx_1+v_{x_1}t = x_2+v_{x_2}t y1+vy1t=y2+vy2ty_1+v_{y_1}t = y_2+v_{y_2}t 消去t,可以得到 x1−x原创 2018-05-02 12:54:06 · 379 阅读 · 0 评论 -
【容斥+组合数】Massage @2018acm徐州邀请赛 E
问题 E: Massage时间限制: 1 Sec 内存限制: 64 MB题目描述JSZKC feels so bored in the classroom that he wants to send massages to his girl friend. However, he can’t move to his girl friend by himself. ...原创 2018-06-06 10:33:48 · 1135 阅读 · 2 评论