摘要:
1、多组输入没有结束标志的两种表示形式 #method1: try: while True: #代码 except EOFError: pass #method2: while True: try: #代码 except: break 2、python的print()函数相关用法 3、range(s 阅读全文
posted @ 2022-11-17 23:03
风归去
阅读(126)
评论(0)
推荐(0)
摘要:
1、基本概念 哈夫曼编码是广泛地用于数据文件压缩的十分有效的编码方法。其压缩率通常在20%~90%之间。哈夫曼编码算法用字符在文件中出现的频率来建立一个用0,1串表示各字符最优表示方式。 给出现频率高的字符较短的编码,出现频率较低的字符以较长的编码,可以大大缩短总代码长。 计算文件总码长 2、前缀码 阅读全文
posted @ 2022-11-17 20:33
风归去
阅读(236)
评论(0)
推荐(0)
摘要:
1、快读相关代码 inline int read() { int x=0,f=0; char ch=getchar(); while(!isdigit(ch))f|=(ch=='-'),ch=getchar(); while(isdigit(ch))x=(x<<1)+(x<<3)+(ch^48),c 阅读全文
posted @ 2022-11-17 18:25
风归去
阅读(76)
评论(0)
推荐(0)
摘要:
1、Cut Ribbon 思路一:数据范围很小,考虑直接枚举。 #include<bits/stdc++.h> #define int long long using namespace std; int n, p, q, r; signed main(){ cin >> n >> p >> q > 阅读全文
posted @ 2022-11-17 16:50
风归去
阅读(21)
评论(0)
推荐(0)

浙公网安备 33010602011771号