摘要: bool check(){ } while(l<=r) { int mid=(l+r)/2;//min=l+(r-l)/2 防止数据溢出 if(check(mid)) l=mid+1; else r=mid-1; } //最大值最小答案是l,最小值最大答案是r 阅读全文
posted @ 2020-04-06 19:56 AlexLIN· 阅读(135) 评论(0) 推荐(0)
摘要: 训练赛上一题,当时没做出来,Orz太弱了 The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c 阅读全文
posted @ 2020-04-06 18:53 AlexLIN· 阅读(180) 评论(0) 推荐(0)
摘要: It is very hard to wash and especially to dry clothes in winter. But Jane is a very smart girl. She is not afraid of this boring process. Jane has dec 阅读全文
posted @ 2020-04-06 17:35 AlexLIN· 阅读(168) 评论(0) 推荐(0)
摘要: 每年奶牛们都要举办各种特殊版本的跳房子比赛,包括在河里从一块岩石跳到另一块岩石。这项激动人心的活动在一条长长的笔直河道中进行,在起点和距离起点 L 远的终点各有一块岩石 (1 ≤ L ≤ 10^9)。在起点和终点之间,有 N 块岩石 (0 ≤ N ≤ 50000),每块岩石与起点的距离分别为 Di 阅读全文
posted @ 2020-04-06 15:44 AlexLIN· 阅读(278) 评论(0) 推荐(0)
摘要: Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize 阅读全文
posted @ 2020-04-06 04:15 AlexLIN· 阅读(196) 评论(0) 推荐(0)
摘要: Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral poste 阅读全文
posted @ 2020-04-04 23:45 AlexLIN· 阅读(138) 评论(0) 推荐(0)
摘要: 以下为为求区间和,求区间最大值,最小值模板 题目以 敌兵布阵 HDU - 1166 为例子 #include <iostream> #include <algorithm> #include <string.h> #include <cstdio> #include <string> #includ 阅读全文
posted @ 2020-04-04 22:13 AlexLIN· 阅读(142) 评论(0) 推荐(0)
摘要: 传送门https://codeforces.com/contest/1167/problem/B 题意 交互题:现在你有6个数4, 8, 15, 16, 23, 42组成的某种组合,你可以询问系统四个问题,每次询问的格式为?i j 然后系统会回复你ai*aj的值,问你这个组合是哪种,题目肯定有解且解 阅读全文
posted @ 2020-04-04 17:04 AlexLIN· 阅读(188) 评论(0) 推荐(0)