摘要: 题目大意:报社根据文章中不同字符的价值付费给作者,给出字符的价值,计算一篇文章应付多少钱给作者。 先统计文章中每个字符出现的次数,再计算价值。直接寻址表(Direct Addressing Table, DAT)的应用。 1 #include 2 #include 3 #define MAXN 256+4 4 #define LINEN 10000+10 5 6 int cnt[MAXN], value[MAXN]; 7 8 int main() 9 {10 #ifdef LOCAL11 freopen("in", "r", stdin);12 #end 阅读全文
posted @ 2013-08-29 17:09 xiaobaibuhei 阅读(205) 评论(0) 推荐(0)
摘要: 题目大意:引用Worlf of Seven的描述,What the problem wants is: 3 1 2 32.0 54.7 -2 54.7 is the 1st position in array -2 is the 2nd position in array 32.0 is on the 3rd position in array 直接进行转化就好了,还有就是题目要求浮点数的输出和输入形式一样,所以浮点数用字符串存储就好了。 1 #include 2 #include 3 #include 4 #include 5 u... 阅读全文
posted @ 2013-08-29 15:29 xiaobaibuhei 阅读(240) 评论(0) 推荐(0)