算法分析与设计
Jiabing Yu
公主号【摆烂工程师】
展开
-
Aizu ALDS1_1_A Insertion Sort(插入排序C语言版)
Insertion SortWrite a program of the Insertion Sort algorithm which sorts a sequence A in ascending order. The algorithm should be based on the following pseudocode:for i = 1 to A.length-1key = A[i]/* insert A[i] into the sorted sequence A[0,…,j-1] */原创 2020-09-26 16:16:17 · 94 阅读 · 0 评论 -
(C语言版)Aizu ALDS1_1_D --- Maximum Profit 最大利润求法
Maximum ProfitYou can obtain profits from foreign exchange margin transactions. For example, if you buy 1000 dollar at a rate of 100 yen per dollar, and sell them at a rate of 108 yen per dollar, you can obtain (108 - 100) × 1000 = 8000 yen.Write a progr原创 2020-09-26 11:51:33 · 257 阅读 · 0 评论