![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
贪心
Think_Idea
水滴石穿
展开
-
HDU1053 Entropy(huffman编码)
///题目的大致意思是给你一个大写字母和下滑线组成的字符串,先计算出字符串在内存中实际占用的字节数,每个char占用8个字节 ///然后通过huffman编码后字符串所占的字节数,两者相除即可 #include #include #include using namespace std; #define MAX 50010///题目为给出字符串的长度,所以此处分配的尽量大原创 2015-05-08 15:04:33 · 462 阅读 · 0 评论 -
最小花费
#include #include #include using namespace std; #define MAX 100010 int x,y; char str[MAX]; int getfinal(int e) { for(int i=e; i>=0; i--) { if(str[i]=='1') re原创 2015-05-07 21:45:00 · 507 阅读 · 0 评论 -
hdu5202 Rikka with string
收获: 1、临界情况检查 2、讨论小数据边量,从中查漏补缺 #include using namespace std; char st[1010]; int n; int main(){ while(scanf("%d",&n)!=EOF){ scanf("%s",st); if(n==1){ printf("QwQ\原创 2015-08-04 23:13:37 · 365 阅读 · 0 评论