上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 97 下一页
摘要: 【题目描述】 小a正在玩一款即时战略游戏,现在他要用航空母舰对敌方阵地进行轰炸 地方阵地可以看做是n×m的矩形 航空母舰总共会派出q架飞机。 飞机有两种,第一种飞机会轰炸以(xi,yi)为中心,对角线长为li的正菱形(也就是两条对角线分别于x轴y轴平行的... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(37) 评论(0) 推荐(0)
摘要: 【题目描述】 小a和小b来到了一条布满了黄金的街道上。它们想要带几块黄金回去,然而这里的城管担心他们拿走的太多,于是要求小a和小b通过做一个游戏来决定最后得到的黄金的数量。 游戏规则是这样的: 假设道路长度为n米(左端点为0,右端点为n),同时给出一个数... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(47) 评论(0) 推荐(0)
摘要: STL 中,在 头文件里提供了两个利用二分查找的方法在一个排好序的数组中进行查找。 在一个从小到大的排好序的数组中: lower_bound(begin,end,num):从数组的 begin 位置到 end-1 位置二分查找第一个大于等于 num 的数字,... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(122) 评论(0) 推荐(0)
摘要: Problem Description A new e-mail service "Berlandesk" is going to be opened in Berland in the near future. The site administrat... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(52) 评论(0) 推荐(0)
摘要: Problem Description You are given a table consisting of n rows and m columns. Each cell of the table contains a number, 0 or 1.... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(152) 评论(0) 推荐(0)
摘要: Problem Description Given N numbers, X1, X2, ... , XN, let us calculate the difference of every pair of numbers: ∣Xi - Xj∣ (1 ≤... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(144) 评论(0) 推荐(0)
摘要: Problem Description What a sunny day! Let’s go picnic and have barbecue! Today, all kids in “Sun Flower” kindergarten are prepa... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(41) 评论(0) 推荐(0)
摘要: Problem Description 对于一个给定的序列a1,…,an,我们对它进行一个操作reduce(i),该操作将数列中的元素ai和ai+1用一个元素max (ai,ai+1)替代,这样得到一个比原来序列短的新序列。这一操作的代价是max(ai,... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(84) 评论(0) 推荐(0)
摘要: Problem Description The SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how ma... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(38) 评论(0) 推荐(0)
摘要: Problem Description You are an adventurer currently journeying inside an evil temple. After defeating a couple of weak zombies,... 阅读全文
posted @ 2022-09-20 22:59 老程序员111 阅读(109) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 97 下一页