文章

2

粉丝

0

获赞

5

访问

386

头像
哈夫曼编码 题解:
P1562
发布于2025年3月14日 17:35
阅读数 147

/*注意只有一个字符的情况比如:AAAAA*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct afman {
    int a;
    double b;
    double c;
}afman;
//快速排序
int povisition(int a[], int low, int high) {
    int povit = a[low];
    while (low < high) {
        while (low < high && povit <= a[high])
            high--;
        a[low] = a[high];
        while (low < high && povit >= a[low])
            low++;
        a[high] = a[low];
    }
    a[low] = povit;
    return low;
}
void QuickSort(int a[], int low, int high) {
    if (low < high) {
     ...

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发