Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

笨方法一个

Posted by wrong123 at 2005-12-06 14:30:40 on Problem 1051
先根据定义创建一个表。
再:
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator