V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  wangpugod2003  ›  全部回复第 5 页 / 共 15 页
回复总数  286
1  2  3  4  5  6  7  8  9  10 ... 15  
317 天前
回复了 wangpugod2003 创建的主题 程序员 chatGPT 刷新题完全不行啊
@jmk92 这个看起来靠谱,思路是对的。
317 天前
回复了 wangpugod2003 创建的主题 程序员 chatGPT 刷新题完全不行啊
不对,大家可以用三个测试用例自己跑下测试下。chatGPT 给出的结果和跑出来的不等。
这个题要用 DP+单调栈去解,确实挺难的。
318 天前
回复了 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.
324 天前
回复了 tomasyang 创建的主题 生活 上海浦东和浦西的分化会越来越大么?
十年前的上海同事说的:“我白天在浦东上班,晚上回上海。”
哪个行业的公司啊?今年怎么行情这么不好?
332 天前
回复了 rqxiao 创建的主题 English 有没有程序员英语简历可以参考的
google “software engineer resume template” 不要太多。
333 天前
回复了 imxiaoi 创建的主题 分享发现 记一次怪怪的面试经历
碰到问题 3:“你们用什么 linux”
这种低端问题,建议你直接走人。
有没 trasnfer 的可能?
333 天前
回复了 abvatous 创建的主题 问与答 扫地机器人解惑
都是垃圾,做好只能用个 1-2 年的打算。
339 天前
回复了 7911364440 创建的主题 程序员 问个分布式事务的问题
你这个需求,是保证整个流程,做到消息的 exactly once 处理.
首先需要确认发出去了,每个模块收到了回 ack, 没有就 retry 该模块; 这样保证 > 1; 注意 retry 多次后如果没收到,再到定时任务中设置一段时间后重发,如果再没收到可以放到 dead message queue 中人工处理;
然后每个对端都要 idempotent ,确保收到的消息(maybe > 1)但是只处理 1 次。一般是需要一个 transaction ID 。
@wangkun025 感谢,请问开启了这个不会让入会的其他人看到吧?
按照事业单位的类型,等级,个人性格、家庭所在地和未来的职业规划而定。
真的做项目,java ,springboot 够了,做啥项目要搞到微服务啊?做个 taobao 还是支付宝?
等你搞个 monolithic 的 java web 程序,再晋级。不然你咋知道 spring cloud 提供了哪些 module ,和 kubernetes 的区别是啥。等等。
358 天前
回复了 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?不会吧!不会吧!
1  2  3  4  5  6  7  8  9  10 ... 15  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   4122 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 34ms · UTC 05:26 · PVG 13:26 · LAX 22:26 · JFK 01:26
Developed with CodeLauncher
♥ Do have faith in what you're doing.