哈哈~柳暗花明
哈哈~柳暗花明
全部文章
题解
归档
标签
去牛客网
登录
/
注册
Renaissancer的博客
全部文章
/ 题解
(共75篇)
不重复打印三元组_python3
数据竟然不允许前两个数相同,要加上and l[i] != l[a]。。。 n, k = map(int, input().split()) l = list(map(int, input().split())) for i in range(n - 2): if i > 0 and l...
2020-07-23
1
703
不重复打印定值二元组_python3
需要考虑重复数据的问题,开始没有想到用双指针,后来解决了,是in在list和dict查找的效率问题,严格一点空间复杂度过不了1、超时 n, k = map(int, input().split()) l = list(map(int, input().split())) for i in range...
2020-07-22
0
738
最长的可整合子数组_python3
感觉题目有点歧义,子数组可以不连续,所以有重复数据也可以去重排序后计算1、731 ms 4088K def check(l): return len(l) == (l[-1] - l[0] + 1) while True: try: n = int(input...
2020-07-21
3
1081
有序行列查找_python3
def check(l, n, m, k): for i in range(n): if str(k) in set(l[i]): return 'Yes' return 'No' while True: try: n...
2020-07-20
0
681
类继承_python3
class shape: __x = 0 __y = 0 class Rectangle(shape): __l = 0 __m = 0 def __init__(self, x, y): self.__l = x self....
2020-07-03
0
717
电子日历类_python3
class TDate: __Day = 0 __Month = 0 __Year = 0 def __init__(self, y = 0, m = 0, d = 0): self.__Day = d self.__Month = m...
2020-07-03
0
586
上三角_python3
n = int(input()) l = [] for i in range(n): l.extend(list(map(int, input().split()))) for i in range(n): for j in range(n): if i > j...
2020-07-03
0
536
质数个数_python3
N = 1001 count = [0]*N l = list(range(2, N)) def countP(n): for i in range(2, n): count[i] = count[i-1] + 1 if i in l else count[i-1] ...
2020-07-03
0
618
期末成绩_python3
l = list(map(int, input().split())) x = [0.2, 0.1, 0.2, 0.5] r = list(map(lambda x,y:x*y, l, x)) print('{:.1f}'.format(sum(r)))
2020-07-03
0
508
请家长_python3
n = int(input()) l = [] x = 0 for i in range(n): l.append(list(map(int, input().split()))) x += 1 if sum(l[i])/3 < 60 else 0 print(x)
2020-07-03
0
481
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页