注册一亩三分地论坛,查看更多干货!
您需要 登录 才可以下载或查看附件。没有帐号?注册账号 
x
本帖最后由 limelime 于 2022-4-11 18:25 编辑
新鲜出炉 OA
祝大家OA顺利
码了主要的文字部分,求加一点米呀 感谢
1. Kindle Direct Publishing
Kindle Direct Publishing, Amazon's e-book selfpublishing platform, is working on a new feature to help authors use
special text characters in different ways. They have asked for your help in beta testing a new part of the feature involving
round and square brackets. Given a string that consists of characters (, ), [, ) and ?, determine how many ways it can be split
into two non-empty substrings such that the characters in each substring can be rearranged into a balanced string.
A sequence of round and square brackets can be rearranged into a balanced sequence if and only if the number of ointeger represents the amount of travel disrance required by this shippng route.output:
Return a list of pairs of integers representing the pairs of IDs of forward and return shipping routes that optimally utilize the given aircraft. If no route is possible, return a list with empty pair.
Example 1:
input:
max = 7000
forward = [[1, 2000], [2,4000],[3,6000]]
return = [[1, 2000]]
output:
[[2, 1]]
|