henryboy233
henryboy233
全部文章
分类
题解(23)
归档
标签
去牛客网
登录
/
注册
henryboy233的博客
绝活
全部文章
(共23篇)
题解 | #记负均正#
依题意得 while True: try: n=int(input()) nums=map(int,input().split()) positive=[] negative=0 for j in nums: ...
Python3
2021-09-19
10
1804
题解 | #二维数组操作#
需要注意输入顺序,理解题目的难度大于编写的难度 while True: try: m, n = map(int, input().split()) x1, y1, x2, y2=map(int,input().split()) insert_x...
Python3
2021-09-18
15
2829
题解 | #字符统计#
while True: try: m = input() s = sorted(m,key=ord) string = '' result = [] for i in s: if i.is...
Python3
2021-09-18
1
689
题解 | #矩阵乘法计算量估算#
def cal_val(A,B): if A[1]==B[0]: return A[0]*B[1]*A[1] else: return -1 def cal(A,B): if A[1]==B[0]: return [A[0],...
2021-07-25
2
569
题解 | #矩阵乘法#
while True: try: x,y,z,A,B=int(input()),int(input()),int(input()),[],[] for i in range(x): A.append(list(map(int, inpu...
2021-07-24
2
579
题解 | #24点游戏算法#
# 题目的隐藏条件好像是,不考虑使用括号,数字位置可调 def helper(arr, item): if item < 1: return False if len(arr) == 1: return arr[0] == item fo...
2021-07-22
6
1134
题解 | #MP3光标位置#
while True: try: a,b,res=input(),input(),''  ...
2021-07-22
1
550
题解 | #MP3光标位置#
while True: try: s1 = int(input()) s2 = list(input()) dic = {'U': -1, 'D': 1} res = [] num = 1 fla...
2021-07-21
2
501
题解 | #DNA序列#
两种方式:一种复杂度为o(n^2): while True: try: a, b = input(), int(input()) maxStr, maxCnt = a[:b], a[:b].count("C") + a[:b].count(...
2021-07-20
3
742
题解 | #计算字符串的距离#
#原题在最后 while True: try: print(int(input())+int(input())) &nbs...
2021-07-19
2
710
首页
上一页
1
2
3
下一页
末页