网站首页
编程语言
数据库
系统相关
其他分享
编程问答
排船
2024-09-09
51nod 1243 排船的问题
51nod1243排船的问题求最长绳子最短,考虑二分答案,判断时我们优先向左放,看是否能全放下。#include<bits/stdc++.h>usingnamespacestd;#definelllonglongintn,x,m;intpos[50005];intcheck(intmid){ intp=x;//偏差地图 intx2=x*2; intmx=m+x;//偏差地图