2013年12月16日

uva 10115 - Automatic Editing

摘要: 这题很简单,就是不停搜索#include#include#includeusing namespace std;int main(){ int n; string words[15],reword[15],l; while(cin>>n){ getchar(); if(n==0) break; for(int i=0;i=0){ l.replace(start,words[i].size(),reword[i]) } } cout<<... 阅读全文

posted @ 2013-12-16 15:22 云在心 阅读(101) 评论(0) 推荐(0)

uva 644 - Immediate Decodability

摘要: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=585可以学习哈弗曼编码,以及二叉树编码,就知道怎么是immediately code#include#includeusing namespace std;int main(){ string code[5000],l; int num=0,temp=0,numNine=0; while(getline(cin,l)){ if(l[0]=='9'){ ... 阅读全文

posted @ 2013-12-16 13:54 云在心 阅读(155) 评论(0) 推荐(0)

导航