Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:笨方法一个In Reply To:笨方法一个 Posted by:wrong123 at 2005-12-06 14:30:40 > 先根据定义创建一个表。 > 再: > string s ---存储输入串 > string store ---存储encode成的莫斯玛 eg: “ ...-----...---......” > int num[101] ---存储每个编码的长度 > string result ---存储decode的结果 > > 之后: > > 从store中,依次读入num[i](反方向)个字符,同时在表中查找对应的字符, > 找到之后就 result.push_back(); 一直到 num[0]; > > 最后: cout<<.......<<result<<endl; > > 中间要注意比较的设计不能出错 多谢指点。过了 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator