摘要:
class Solution { public: vector<int> searchRange(vector<int>& nums, int target) { if(nums.size()==0) return vector<int> {-1,-1}; int l,r,mid; l=0,r = 阅读全文
2021年9月7日
2020年1月29日
摘要:
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer 阅读全文
2020年1月22日
摘要:
There is a public bike service in Hangzhou City which provides great convenience to the tourists from all over the world. One may rent a bike at any s 阅读全文
2020年1月2日
摘要:
Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a 阅读全文
2019年12月21日
摘要:
Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1. The Max 阅读全文
2019年11月7日
2019年10月11日
摘要:
链接:https://ac.nowcoder.com/acm/contest/1034/B来源:牛客网 题目描述 在一片广袤无垠的原野上,散落着N块磁石。 每个磁石的性质可以用一个五元组(x,y,m,p,r)描述,其中x,y表示其坐标,m是磁石的质量,p是磁力,r是吸引半径。 若磁石A与磁石B的距离 阅读全文
2019年10月7日
摘要:
链接:https://ac.nowcoder.com/acm/contest/1034/A来源:牛客网 题目描述 在乡下的小路旁种着许多蒲公英,而我们的问题正是与这些蒲公英有关。 为了简化起见,我们把所有的蒲公英看成一个长度为 n 的序列a1,a2,…,ana_1,a_2,\dots,a_na1, 阅读全文
2019年9月22日
2019年9月18日
摘要:
链接:https://ac.nowcoder.com/acm/contest/1032/A来源:牛客网 题目描述 在完成了分配任务之后,西部314来到了楼兰古城的西部。 相传很久以前这片土地上(比楼兰古城还早)生活着两个部落,一个部落崇拜尖刀(‘V’),一个部落崇拜铁锹(‘∧’),他们分别用V和∧的 阅读全文