燕草如碧
燕草如碧
全部文章
题解
归档
标签
去牛客网
登录
/
注册
燕草如碧的博客
全部文章
/ 题解
(共54篇)
题解 | #小乐乐计算函数#
easy n = list(map(int,input().split())) def fk(a,b,c): return max((a+b,b,c))/(max((a,b+c,c))+max((a,b,c+b))) print(fk(n[0],n[1],n[2]))
Python3
2022-06-23
0
265
题解 | #字符串操作#
抄作业,稍有改动 n,m =map(int,input().split()) str1 =[i for i in input()] for i in range(m): l,r,ch1,ch2 = input().split() for j in range(int(l)-1,int...
Python3
2022-06-23
1
346
题解 | #蛇形矩阵#JS用状态解决
既然没人用JS写,我就写了下,大家可以拿去copy copy看看 while(line=readline()){ var n = line.split(); let position = new Array(); let str1 = ""; ...
Javascript V8
Javascript Node
HTML/CSS/JavaScript
2022-06-23
0
306
题解 | #蛇形矩阵#JS用状态解决
既然没人用JS写,我就写了下,大家可以拿去copy copy看看 while(line=readline()){ var n = line.split(); let position = new Array(); let str1 = ""; ...
Javascript V8
Javascript Node
HTML/CSS/JavaScript
2022-06-23
0
305
题解 | #[NOIP2008]笨小猴#数据结构dic和set 注释详细
使用dic和set数据结构解出,详细可看注释 # 字典非手写,同学请注意 def isPrime(num):#判断质数的函数 if num == 1 or num ==0: return False for i in range(2,num): if ...
Python3
2022-06-23
1
460
题解 | #扫雷#有限状态机
想用有限状态机解的,但是算法循环多了,导致超时 row,col = map(int,input().split()) minetb = [[0 for _ in range (col)] for _ in range(row) ] state = 0 x,y=0,0 allstate = [[0,1...
Python3
2022-06-22
0
381
题解 | #井字棋#抄作业
楼上太牛,直接抄作业,改都不用改,太完美了,. l=[] for i in range(3): l.extend(input().split()) lk = ['K','K','K'] lb = ['B','B','B'] n=[l[0:3],l[3:6],l[6:9],l[0::3],l[...
Python3
2022-06-22
1
230
题解 | #杨辉三角#
我用遍历二维数组做出来的,楼上用append做出来实在佩服啊 n = int(input()) a = [[1 for _ in range(n)] for _ in range(n)] for i in range(0,n): for j in range(0,i+1): ...
Python3
2022-06-22
2
603
题解 | #矩阵交换#简单是简单就是太长了
奉上我的垃圾代码,简单是简单就是太长了 row,col = map(int,input().split()) tmp = [0 for _ in range(col)] tmp2 = 0 matrix = [[0 for _ in range(col)]for _ in range(row)] f...
Python3
2022-06-22
0
294
题解 | #矩阵转置#二维数组
我坚持二维数组 row,col = map(int,input().split()) matrix1 = [[0 for _ in range(col)] for _ in range(row)] matrix2 = [[0 for _ in range(row)] for _ in range(...
Python3
2022-06-22
1
473
首页
上一页
1
2
3
4
5
6
下一页
末页