V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  wangpugod2003  ›  全部回复第 6 页 / 共 16 页
回复总数  304
1 ... 2  3  4  5  6  7  8  9  10  11 ... 16  
2023-06-15 09:07:03 +08:00
回复了 wangpugod2003 创建的主题 程序员 chatGPT 刷新题完全不行啊
@liqinliqin
@wonderfulcxm

2355. Maximum Number of Books You Can Take


You are given a 0-indexed integer array books of length n where books[i] denotes the number of books on the ith shelf of a bookshelf.

You are going to take books from a contiguous section of the bookshelf spanning from l to r where 0 <= l <= r < n. For each index i in the range l <= i < r, you must take strictly fewer books from shelf i than shelf i + 1.

Return the maximum number of books you can take from the bookshelf.



Example 1:

Input: books = [8,5,2,7,9]
Output: 19
Explanation:
- Take 1 book from shelf 1.
- Take 2 books from shelf 2.
- Take 7 books from shelf 3.
- Take 9 books from shelf 4.
You have taken 19 books, so return 19.
It can be proven that 19 is the maximum number of books you can take.
Example 2:

Input: books = [7,0,3,4,5]
Output: 12
Explanation:
- Take 3 books from shelf 2.
- Take 4 books from shelf 3.
- Take 5 books from shelf 4.
You have taken 12 books so return 12.
It can be proven that 12 is the maximum number of books you can take.
Example 3:

Input: books = [8,2,3,7,3,4,0,1,4,3]
Output: 13
Explanation:
- Take 1 book from shelf 0.
- Take 2 books from shelf 1.
- Take 3 books from shelf 2.
- Take 7 books from shelf 3.
You have taken 13 books so return 13.
It can be proven that 13 is the maximum number of books you can take.
2023-06-08 14:15:13 +08:00
回复了 tomasyang 创建的主题 生活 上海浦东和浦西的分化会越来越大么?
十年前的上海同事说的:“我白天在浦东上班,晚上回上海。”
哪个行业的公司啊?今年怎么行情这么不好?
2023-05-31 16:13:36 +08:00
回复了 rqxiao 创建的主题 English 有没有程序员英语简历可以参考的
google “software engineer resume template” 不要太多。
2023-05-31 09:55:38 +08:00
回复了 imxiaoi 创建的主题 分享发现 记一次怪怪的面试经历
碰到问题 3:“你们用什么 linux”
这种低端问题,建议你直接走人。
有没 trasnfer 的可能?
2023-05-30 16:52:20 +08:00
回复了 abvatous 创建的主题 问与答 扫地机器人解惑
都是垃圾,做好只能用个 1-2 年的打算。
2023-05-24 14:49:58 +08:00
回复了 7911364440 创建的主题 程序员 问个分布式事务的问题
你这个需求,是保证整个流程,做到消息的 exactly once 处理.
首先需要确认发出去了,每个模块收到了回 ack, 没有就 retry 该模块; 这样保证 > 1; 注意 retry 多次后如果没收到,再到定时任务中设置一段时间后重发,如果再没收到可以放到 dead message queue 中人工处理;
然后每个对端都要 idempotent ,确保收到的消息(maybe > 1)但是只处理 1 次。一般是需要一个 transaction ID 。
@wangkun025 感谢,请问开启了这个不会让入会的其他人看到吧?
2023-05-15 10:09:45 +08:00
回复了 iHaooo 创建的主题 职场话题 [求助] 互联网开发职位与宁波市直事业单位,如何抉择?
按照事业单位的类型,等级,个人性格、家庭所在地和未来的职业规划而定。
2023-05-06 10:59:36 +08:00
回复了 chaleaochexist 创建的主题 程序员 哪位大哥给讲讲 spring cloud 到底是个啥?
真的做项目,java ,springboot 够了,做啥项目要搞到微服务啊?做个 taobao 还是支付宝?
等你搞个 monolithic 的 java web 程序,再晋级。不然你咋知道 spring cloud 提供了哪些 module ,和 kubernetes 的区别是啥。等等。
2023-05-05 16:19:28 +08:00
回复了 wegfdhsak 创建的主题 程序员 这两天我司预计又干掉 40 个技术人员
公司是哪个行业的啊?
2023-04-28 11:39:05 +08:00
回复了 0littleboy 创建的主题 程序员 工作城市梯度排行
IT 首选北上深吧,然后第二梯队是杭成,第三梯队:南京武汉西安苏州等等
放心吧,未来会越来越好。
到时候周围为您服务的(物业、外卖、滴滴)可能都是硕士博士哦,国之栋梁哦。
教育世界第一了吧,那还能不好?
韩联社世宗 6 月 29 日电韩国最低工资委员会 29 日下午举行第八次全体会议,决定将 2023 年法定最低时薪上调至 9620 韩元(约合人民币 49.68 元),涨幅为 5%。
时薪差不多 50 元,一天是 8 * 50 = 400 ,一个月最低标准 400 * 23 = 9k+...

-------------------------------------------------------------------------
在月最低工资标准方面,上海月最低工资标准达到 2590 元,这一水平位居全国第一。 其次是深圳,月最低工资标准达到 2360 元。 北京排第三,月最低工资标准达到 2320 元。
难道我们现在指望的是房价很低?然后工作到处随便找?然后一点压力都没有?然后看到喜欢的女孩只要一追求就 OK?不会吧!不会吧!
2023-04-23 15:12:19 +08:00
回复了 jiezaichan 创建的主题 问与答 遇到为了反驳而反驳的父母时、如何寻找内心的秩序
实话说很多父母和子女,如果你不让他们说为了反驳而反驳的啰嗦话,你最终会发现。。
你和他们根本没别的话说。。
2023-04-21 17:23:43 +08:00
回复了 razios 创建的主题 问与答 能把一手好牌打烂的互联网公司或产品有哪家?
人人网,或者校内网,算不算?
当前可是中国的 facebook 啊,一代人的青春记忆。。可惜了。。
1 ... 2  3  4  5  6  7  8  9  10  11 ... 16  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2720 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 93ms · UTC 10:08 · PVG 18:08 · LAX 02:08 · JFK 05:08
Developed with CodeLauncher
♥ Do have faith in what you're doing.