摘要: A Thickest Burger a+b+max(a,b) include using namespace std; typedef long long ll; int main(){ //freopen("in.txt","r",stdin); int n,a,b; while(~scanf(" 阅读全文
posted @ 2017-11-21 23:31 foreignbill 阅读(325) 评论(0) 推荐(0) 编辑
摘要: D What a Beautiful Lake 找递增长度递减长度 1 include define maxn 205 using namespace std; int n; int a[maxn]; int main(){ //freopen("in.txt","r",stdin); while( 阅读全文
posted @ 2017-11-21 23:25 foreignbill 阅读(303) 评论(0) 推荐(0) 编辑
摘要: A ArcSoft's Office Rearrangement 均分石子。 好像怎么分答案都一样,于是模拟一遍。 D Difference 每个k预处理一半,然后用中途相遇法,就是类似尺取。 include using namespace std; typedef long long ll; ll 阅读全文
posted @ 2017-11-21 23:18 foreignbill 阅读(124) 评论(0) 推荐(0) 编辑
摘要: A Wrestling Match 判断二分图,特判没属性的孤点。 D A Simple Math Problem 设$G=gcd(a,b)$。 $gcd(a,b)=gcd(x+y,lcm(x,y))=gcd(x+y,ky)=gcd(x+y,y)=gcd(x,y)$ 那么等式$\frac{x}{G} 阅读全文
posted @ 2017-11-21 22:49 foreignbill 阅读(132) 评论(0) 推荐(0) 编辑
摘要: A Too Rich 给定每一种面值的硬币的个数,求出用最多硬币表示出所给价值。 倒着做可以用前缀和优化和剪枝。 可以$O(1)$算出当前面值减去前缀和之后最少需要几个,然后在此基础上多做3次就可以了,因为前一种硬币最多3枚就可以表示后一种硬币了。 G Dancing Stars on Me 每个点 阅读全文
posted @ 2017-11-21 22:36 foreignbill 阅读(285) 评论(0) 推荐(0) 编辑
摘要: A An Easy Physics Problem Not Easy 啊。 给个射线,和一个圆柱体,射线撞到圆柱体会弹射。判断能否经过给定的点。 折射的时候不能用三角函数旋转,会被卡精度。 $(x,y)$关于直线$ax+by+c=0$的对称点坐标$nx=x 2a\frac{ax+by+c}{a^2+ 阅读全文
posted @ 2017-11-21 22:18 foreignbill 阅读(417) 评论(0) 推荐(0) 编辑
摘要: Hdu 2665 区间K小 include using namespace std; typedef long long ll; const int maxn = 1e5+5; int arr[maxn]; int Rank[maxn]; struct ChairTree{ define lson 阅读全文
posted @ 2017-11-21 15:48 foreignbill 阅读(147) 评论(0) 推荐(0) 编辑