24小时热门版块排行榜    

查看: 247  |  回复: 0

奔跑在天山

铁虫 (初入文坛)

[求助] PHP编程

大家好,我这里有一个PHP编程的题,是先将字符串:tomorrow_and_tomorrow_and_tomorrow转换成bwt_t:  wwwdd__nnoooaatttmmmrrrrrrooo__$ooo;再转换成t_back:  $worromot_dna_worromot_dna_worromot。这后一步的程序我不会写(也就是“function reverseBwt($bw){”这一步),求高手指点。谢谢各位了

程序:
// Dr. Han’s implementation of the BWT
// 20140408
$t = "tomorrow_and_tomorrow_and_tomorrow";
$bwt_t = bwt($t);
$tBack = reverseBwt($bwt_t);
print "t: $t\n";
print "bwt_t: $bwt_t\n";
print "t_back: $tBack\n";
print "Job done!\n";
function bwt($t){
……
}
function reverseBwt($bw){
……
}



结果:
‐bash‐3.2$ php bwt.php
t: tomorrow_and_tomorrow_and_tomorrow
bwt_t:
wwwdd__nnoooaatttmmmrrrrrrooo__$ooo
t_back:
$worromot_dna_worromot_dna_worromot
Job done!
‐bash‐3.2$
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 奔跑在天山 的主题更新
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 化学调剂一志愿上海交通大学336分-本科上海211 +3 小鱼爱有机 2026-03-25 3/150 2026-03-25 20:13 by qingfeng258
[考研] 材料学硕333求调剂 +4 北道巷 2026-03-24 4/200 2026-03-25 14:16 by mapenggao
[考研] 各位老师您好:本人初试372分 +5 jj涌77 2026-03-25 6/300 2026-03-25 14:15 by mapenggao
[考研] 281求调剂 +4 Koxui 2026-03-24 5/250 2026-03-25 11:38 by userper
[考研] 299求调剂 +7 shxchem 2026-03-20 9/450 2026-03-25 10:41 by lbsjt
[考研] 【考研调剂】化学专业 281分,一志愿四川大学,诚心求调剂 +15 吃吃吃才有意义 2026-03-19 16/800 2026-03-24 19:51 by 了了了了。。
[考研] 070300化学求调剂 +9 苑豆豆 2026-03-20 9/450 2026-03-24 17:15 by licg0208
[考研] 279分求调剂 一志愿211 +18 chaojifeixia 2026-03-19 20/1000 2026-03-24 10:34 by dolphin_ycj
[考研] 一志愿北京化工大学 070300 学硕 336分 求调剂 +7 vv迷 2026-03-22 7/350 2026-03-23 23:44 by Txy@872106
[考研] 361求调剂 +3 Glack 2026-03-22 3/150 2026-03-23 22:03 by fuyu_
[论文投稿] 急发核心期刊论文 +3 贤达问津 2026-03-23 5/250 2026-03-23 17:13 by 妹子不好惹
[考研] 材料与化工085600,总分304,本科有两篇sci参与,求调剂 +4 幸运的酱酱 2026-03-22 5/250 2026-03-22 20:15 by edmund7
[考研] 324求调剂 +6 lucky呀呀呀鸭 2026-03-20 6/300 2026-03-22 16:01 by ColorlessPI
[考研] 303求调剂 +5 安忆灵 2026-03-22 6/300 2026-03-22 12:46 by 素颜倾城1988
[考研] 求调剂 +7 Auroracx 2026-03-22 7/350 2026-03-22 12:38 by 素颜倾城1988
[考研] 285求调剂 +6 ytter 2026-03-22 6/300 2026-03-22 12:09 by 星空星月
[考研] 求调剂一志愿南京航空航天大学289分 +3 @taotao 2026-03-19 3/150 2026-03-20 21:34 by JourneyLucky
[考研] 材料学硕297已过四六级求调剂推荐 +11 adaie 2026-03-19 11/550 2026-03-20 21:30 by laoshidan
[考研] 求调剂 +3 eation27 2026-03-20 3/150 2026-03-20 19:32 by JourneyLucky
[考研] 招收调剂硕士 +4 lidianxing 2026-03-19 12/600 2026-03-20 12:25 by lidianxing
信息提示
请填处理意见