小明种树 试题编号: 201909-1 试题名称: 小明种苹果 时间限制: 2.0s 内存限制: 512.0MB 题解:模拟一下,记录坏果数量和对应的果树的序号,排下序 3 3 73 -8 -6 -4 76 -5 -10 -8 80 -6 -15 0 1 n,m=map(int, input().s ...
分类:
编程语言 时间:
2021-04-06 14:37:49
阅读次数:
0
Python编码解码技巧汇总 encode encode将字符串转换为bytes类型的对象 (即b为前缀, bytes类型), 即Ascll编码, 字节数组 a = "检测到网站攻击" print(a.encode()) print(type(a.encode())) # b'\xe6\xa3\x8 ...
分类:
编程语言 时间:
2021-04-06 14:32:28
阅读次数:
0
项目地址: github.com/brython-dev/brython 当前版本 3.9.1 ,支持cpython3.9.0 cdn加速: https://www.bootcdn.cn/brython/ django中使用cpython : django-brython 最新版本发布于2020年1 ...
分类:
编程语言 时间:
2021-04-06 14:04:12
阅读次数:
0
6.3较之前有些不同 sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxl ...
分类:
其他好文 时间:
2021-04-06 14:03:16
阅读次数:
0
s = set('hello,word') print(s) #set 方法 s = {'xiaoming', 'xiaoming', 'xiaoming1'} print(s) s.add('s') # 添加元素 s.clear(s) # 清空集合 s1 = s.copy(s) # 复制集合 s. ...
分类:
编程语言 时间:
2021-04-05 12:51:32
阅读次数:
0
# %s 全能 print('I am %s my hobby is %s' %('A','alex')) print('I am %s , I`m %s year old' %('A',1)) # %d 整型 # name = input('你的姓名:') # age = int(input('你 ...
分类:
编程语言 时间:
2021-04-05 12:51:05
阅读次数:
0
一 for循环 #for循环可以循环任何序列的项目 for i in range(1,10): for j in range(1,i+1): print('%s*%s=%s'%(i,j,i*j),end="") print() 二 可变不可变类型 #for循环可以循环任何序列的项目 for i in ...
分类:
编程语言 时间:
2021-04-05 12:49:56
阅读次数:
0
创建队列 #创建队列 queue=deque() #这里创建的是双端的 添加元素 #append()方法 O(1) queue.append(1) queue.append(2) queue.append(3) print(queue) #[1,2,3] 获取即将出队的元素 # O(1) temp1 ...
分类:
编程语言 时间:
2021-04-05 12:30:54
阅读次数:
0
关键字联想词优化方案 Redis + Trie树 4.4.1现有问题 每次输入关键字的时候都会调用后台获取数据,频繁的发起请求查询数据库,并且是模糊查询 随着联想词的搜索越来越频繁,每次从数据库查询非常占用数据库资源,同时查询效率比较低 4.4.2 优化方案Trie树 优化方案: 数据能够缓存到re ...
分类:
其他好文 时间:
2021-04-05 12:26:58
阅读次数:
0
一、kmeans聚类 import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import re pd.set_option('max_columns', 600) pd ...
分类:
其他好文 时间:
2021-04-05 12:19:16
阅读次数:
0