商汤科技笔试#智慧城市算法岗笔试题

商汤科技笔试#智慧城市算法岗笔试题
大佬把你们的答案放出来吧,
#商汤科技##笔试题目#
全部评论
凉凉,现在看到1000000007就害怕
点赞 回复 分享
发布于 2019-08-19 21:18
 1.[二进制求合](https://leetcode-cn.com/problems/add-binary/) 2.[找出只出现一次的数字](https://www.nowcoder.com/questionTerminal/e02fdb54d7524710a7d664d082bb7811) 3.[记票统计](https://www.nowcoder.com/questionTerminal/3350d379a5d44054b219de7af6708894)  是这三道题吗- -
点赞 回复 分享
发布于 2019-08-19 21:18
太BT了吧这题 后三道全是数学题😂 我只知道第二题矩阵乘法加快速幂
点赞 回复 分享
发布于 2019-08-19 21:20
https://blog.csdn.net/u014119694/article/details/99763922
点赞 回复 分享
发布于 2019-08-19 21:22
a,b=map(int,input().split()) gua=[ [0] * 2 for i in range(a)] for i in range(a):     gua[i-1][0],gua[i-1][1]=map(int,input().split())     gua.sort() d=[0] * b result=[-1] * b for i in range(b):     n=int(input())     for j in range(len(gua)):         if(gua[j-1][0]>=n and gua[j-1][1]>result[i-1]):             result[i-1]=gua[j-1][1] for i in range(b):     print(result[i-1])
点赞 回复 分享
发布于 2019-08-19 21:25
# 80% n, m = map(int, input().strip().split()) time_weights = [] for i in range(n):     p = list(map(int, input().strip().split()))     time_weights.append(p)      ds = [] for i in range(m):     d = int(input().strip())     ds.append(d) result = [] for d in ds:     max_weight =  0     for item in time_weights:         if item[0] >= d and item[1] >= max_weight:             max_weight = item[1]     if max_weight == 0:         result.append(-1)     else:         result.append(max_weight) for r in result:     print(r) #20%,超内存 n, a, b, c, f0 = list(map(int, input().strip().split())) f1 = a * f0 + 32768 f2 = a * f1 + b * f0 + 32773 f_n = [f0, f1, f2] if n < 3:     print(f_n[n]) else:     for year in range(n-2):         money = a * f_n[year+2] + b * f_n[year+1] + c * f_n[year] + 2 * (year+3)**2 - (year+3) + 32767         f_n.append(money)            print(f_n[-1]) 超内存是因为把所有结果都保存到列表中了?
点赞 回复 分享
发布于 2019-08-19 21:29

相关推荐

评论
点赞
9
分享

创作者周榜

更多
牛客网
牛客企业服务