- 博客(4)
- 收藏
- 关注
原创 Quick sort
Quick sort——快速排序,执行效率更高的一种排序方法,代码如下:#include<stdio.h>void quicksort(int *num,int left,int right);int main(void){int arr[10],i;for(i = 0;i < 10;i++){scanf("%d",&arr[i]);}quicksort(...
2020-03-07 23:02:44 83
原创 Select sort
Select sort——选择排序,每一次选出最大或最小的数放在数组的最前端(下面代码为最小),而不是像冒泡排序一样每一次都需要互换位置,以下为代码:#include<stdio.h>#define N 100void select_sort(int *array,int num);int main(void){int n,i;int arr[N];scanf("%d",...
2020-03-07 23:00:37 235
原创 A + B Problem II
A + B Problem III have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the input contains an integer T(1<=T<...
2020-02-29 14:38:35 160
原创 Color Me Less
A color reduction is a mapping from a set of discrete colors to a smaller one. The solution to this problem requires that you perform just such a mapping in a standard twenty-four bit RGB color space....
2020-02-28 17:59:27 258
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人