二分
龍木
若人生为棋,我愿为卒,漫漫征途,谁曾见我后退半步
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
力扣训练——二分
本篇参照大佬博客练习题顺序,代码都是自打的,有些可能不是最优解。69. x 的平方根class Solution {public: int mySqrt(int x) { long long l=1,r=x; while(l<=r) { long long mid=(l+r)/2; if(mid*mid>x) { r=mid-原创 2021-01-27 13:24:12 · 413 阅读 · 0 评论 -
B. Toy Blocks
https://codeforces.ml/contest/1452/problem/BYou are asked to watch your nephew who likes to play with toy blocks in a strange way.He hasnnboxes and theii-th box hasaiaiblocks. His game consists of two steps:he chooses an arbitrary boxii; he tr...原创 2020-11-23 17:04:48 · 383 阅读 · 1 评论 -
D - Vacation
链接:https://vjudge.net/contest/381756#problem/DTom and Jerry are going on a vacation. They are now driving on a one-way road and several cars are in front of them. To be more specific, there arenncars in front of them. Theiith car has a length oflili,...原创 2020-07-08 09:53:54 · 343 阅读 · 0 评论 -
C. Mixing Water
链接:https://codeforces.ml/contest/1359/problem/CThere are two infinite sources of water:hot water of temperaturehh; cold water of temperaturecc(c<hc<h).You perform the following procedure of alternating moves:takeonecup of thehotwater a...原创 2020-05-29 12:32:34 · 307 阅读 · 0 评论 -
[3] 3276 [2017_4]跳房子
题目链接:http://acm.ocrosoft.com/problem.php?cid=1627&pid=15题目描述题目可见:https://www.luogu.org/problemnew/show/P3957跳房子,也叫跳飞机,是一种世界性的儿童游戏,也是中国民间传统的体育游戏之一。跳房子的游戏规则如下:在地面上确定一个起点,然后在起点右侧画n个格子,这些格...原创 2019-07-14 10:45:27 · 352 阅读 · 0 评论
分享