2644: 烤干机 c++分治思想 摘要:解题思路:这道题第一眼会想到全排列或者优先队列毫无疑问这是错的,因为时间复杂度太高了所以我想的是分治算法(因为最近比较菜想了好久)int f[500002];定义数组 int a(即A),b(即B)首…… 题解列表 2021年12月24日 0 点赞 0 评论 511 浏览 评分:7.3
1715: 数据结构-折半插入排序-C语言 摘要:```c //折半插入排序 #include #include #define max 1000 void BiInsertsort(int a[],int len); int…… 题解列表 2021年12月24日 0 点赞 0 评论 850 浏览 评分:9.9
divmod(x, y)函数,集商和余数于一体 摘要: # a, b = divmod(x, y) divmod()函数会返回两个值,第一个为 x // y, 第二个返回值为 x % y MoneyVariety_lis =…… 题解列表 2021年12月24日 0 点赞 0 评论 796 浏览 评分:0.0
str = replace(old, new)替换所有空格 摘要:就这???? 就这??? while 1: st = input() NewSt = st.replace(' ', '') print…… 题解列表 2021年12月24日 0 点赞 0 评论 340 浏览 评分:0.0
题解 1161: 回文数(二)(python) 摘要:def n_to_ten(n,m): j = 0 sum =0 for i in str(m)[::-1]: sum += int(i)*n**j …… 题解列表 2021年12月24日 0 点赞 0 评论 644 浏览 评分:0.0
1129: C语言训练-排序问题<2> 快速排序法 摘要:解题思路:采用快速排序法,采用最左边的数为基准数,将小于等于基准点的数全部放到基准点右边,将大于等于基准点的数全部放到基准点左边,实现从大到小的排序注意事项:相比冒泡排序,每次交换是跳跃式的,最差情况…… 题解列表 2021年12月24日 0 点赞 0 评论 409 浏览 评分:0.0
1716: 数据结构-快速排序-C语言 摘要:```c //快速排序 #include #include void quicksort(int a[], int first, int end); int partition(in…… 题解列表 2021年12月24日 0 点赞 0 评论 791 浏览 评分:9.9
妹子杀手的故事 摘要:while True: l,h = map(int,input().split()) if l == 0 and h == 0: break print…… 题解列表 2021年12月24日 0 点赞 0 评论 389 浏览 评分:0.0
陈教主的三角形 摘要:while True: try: ls = list(map(int,input().split())) ls.sort() a, 题解列表 2021年12月24日 0 点赞 0 评论 285 浏览 评分:0.0