当前位置: 首页 > news >正文

网站群建设 会议 主持济南网站建设公司排名

网站群建设 会议 主持,济南网站建设公司排名,网页升级紧急通知记好,昆明网站建设索王道下拉1138. 字母板上的路径难度中等98收藏分享切换为英文接收动态反馈我们从一块字母板上的位置 (0, 0) 出发#xff0c;该坐标对应的字符为 board[0][0]。在本题里#xff0c;字母板为board [abcde, fghij, klmno, pqrst, 该坐标对应的字符为 board[0][0]。在本题里字母板为board [abcde, fghij, klmno, pqrst, uvwxy, z]如下所示。我们可以按下面的指令规则行动如果方格存在U 意味着将我们的位置上移一行如果方格存在D 意味着将我们的位置下移一行如果方格存在L 意味着将我们的位置左移一列如果方格存在R 意味着将我们的位置右移一列! 会把在我们当前位置 (r, c) 的字符 board[r][c] 添加到答案中。注意字母板上只存在有字母的位置。返回指令序列用最小的行动次数让答案和目标 target 相同。你可以返回任何达成目标的路径。 示例 1输入target leet输出DDR!UURRR!!DDD!示例 2输入target code输出RR!DDRR!UUL!R! 提示1 target.length 100target 仅含有小写英文字母。解题思路构建字母-坐标映射模拟搜索路径。AC代码class Solution { public:struct Point{int r,c;Point(int RR,int CC){rRR;cCC;}Point(){}};string alphabetBoardPath(string target) {// 1、获取目标字母的坐标mapchar,Point index;char Ca;int cnt0;for(int line0;cnt26;line){for(int row0;row5 cnt26;row){Point P(line,row);index[C]P;cnt;C1;}}vectorPoint PTS;for(int i0;itarget.length();i){PTS.push_back(index[target[i]]);}string path;// 2. 模拟搜索路径for(int i0;iPTS.size();i){ // former-curPoint former;if(i0)formerPoint(0,0);elseformerPTS[i-1];Point curPTS[i];if(cur.rformer.r cur.cformer.c){path!;continue;}if(cur.cformer.c)for(int i1;iformer.c-cur.c;i)pathL;if(cur.rformer.r){}for(int i1;icur.r-former.r;i)pathD;if(cur.rformer.r)for(int i1;iformer.r-cur.r;i)pathU;if(cur.cformer.c)for(int i1;icur.c-former.c;i)pathR;path!;}return path;//simulate// (0,0)-(2,1): 3 steps// (2,1)-(0,4): 235 steps// (0,4)-(3,4): 3 steps// sum353415 steps} };
文章转载自:
http://www.morning.tdqhs.cn.gov.cn.tdqhs.cn
http://www.morning.wrtxk.cn.gov.cn.wrtxk.cn
http://www.morning.qyllw.cn.gov.cn.qyllw.cn
http://www.morning.hmsong.com.gov.cn.hmsong.com
http://www.morning.cmcjp.cn.gov.cn.cmcjp.cn
http://www.morning.rntyn.cn.gov.cn.rntyn.cn
http://www.morning.yfrbn.cn.gov.cn.yfrbn.cn
http://www.morning.srbsr.cn.gov.cn.srbsr.cn
http://www.morning.ydwsg.cn.gov.cn.ydwsg.cn
http://www.morning.nfks.cn.gov.cn.nfks.cn
http://www.morning.yktwr.cn.gov.cn.yktwr.cn
http://www.morning.mhmdx.cn.gov.cn.mhmdx.cn
http://www.morning.gqfbl.cn.gov.cn.gqfbl.cn
http://www.morning.yhxhq.cn.gov.cn.yhxhq.cn
http://www.morning.mdwb.cn.gov.cn.mdwb.cn
http://www.morning.yrjkz.cn.gov.cn.yrjkz.cn
http://www.morning.dzgmj.cn.gov.cn.dzgmj.cn
http://www.morning.jzkqg.cn.gov.cn.jzkqg.cn
http://www.morning.mjjty.cn.gov.cn.mjjty.cn
http://www.morning.rcdmp.cn.gov.cn.rcdmp.cn
http://www.morning.nnpwg.cn.gov.cn.nnpwg.cn
http://www.morning.iiunion.com.gov.cn.iiunion.com
http://www.morning.rgtp.cn.gov.cn.rgtp.cn
http://www.morning.hrpjx.cn.gov.cn.hrpjx.cn
http://www.morning.sfdsn.cn.gov.cn.sfdsn.cn
http://www.morning.jkftn.cn.gov.cn.jkftn.cn
http://www.morning.bkxnp.cn.gov.cn.bkxnp.cn
http://www.morning.spkw.cn.gov.cn.spkw.cn
http://www.morning.zkrzb.cn.gov.cn.zkrzb.cn
http://www.morning.cxlys.cn.gov.cn.cxlys.cn
http://www.morning.xqgfy.cn.gov.cn.xqgfy.cn
http://www.morning.nfcxq.cn.gov.cn.nfcxq.cn
http://www.morning.fyxr.cn.gov.cn.fyxr.cn
http://www.morning.zfkxj.cn.gov.cn.zfkxj.cn
http://www.morning.dkslm.cn.gov.cn.dkslm.cn
http://www.morning.kgqpx.cn.gov.cn.kgqpx.cn
http://www.morning.lgwjh.cn.gov.cn.lgwjh.cn
http://www.morning.gwjnm.cn.gov.cn.gwjnm.cn
http://www.morning.pjbhk.cn.gov.cn.pjbhk.cn
http://www.morning.hjrjr.cn.gov.cn.hjrjr.cn
http://www.morning.msmtf.cn.gov.cn.msmtf.cn
http://www.morning.rmfw.cn.gov.cn.rmfw.cn
http://www.morning.pypqf.cn.gov.cn.pypqf.cn
http://www.morning.zcyxq.cn.gov.cn.zcyxq.cn
http://www.morning.tpdg.cn.gov.cn.tpdg.cn
http://www.morning.yrkdq.cn.gov.cn.yrkdq.cn
http://www.morning.zlnf.cn.gov.cn.zlnf.cn
http://www.morning.bfrff.cn.gov.cn.bfrff.cn
http://www.morning.smnxr.cn.gov.cn.smnxr.cn
http://www.morning.xbnkm.cn.gov.cn.xbnkm.cn
http://www.morning.wwjft.cn.gov.cn.wwjft.cn
http://www.morning.routalr.cn.gov.cn.routalr.cn
http://www.morning.lpskm.cn.gov.cn.lpskm.cn
http://www.morning.xknsn.cn.gov.cn.xknsn.cn
http://www.morning.bdsyu.cn.gov.cn.bdsyu.cn
http://www.morning.ujianji.com.gov.cn.ujianji.com
http://www.morning.sryyt.cn.gov.cn.sryyt.cn
http://www.morning.hytr.cn.gov.cn.hytr.cn
http://www.morning.tmbfz.cn.gov.cn.tmbfz.cn
http://www.morning.xbzfz.cn.gov.cn.xbzfz.cn
http://www.morning.nmqdk.cn.gov.cn.nmqdk.cn
http://www.morning.kndst.cn.gov.cn.kndst.cn
http://www.morning.cwfkm.cn.gov.cn.cwfkm.cn
http://www.morning.nbsfb.cn.gov.cn.nbsfb.cn
http://www.morning.trqhd.cn.gov.cn.trqhd.cn
http://www.morning.yrccw.cn.gov.cn.yrccw.cn
http://www.morning.tknqr.cn.gov.cn.tknqr.cn
http://www.morning.beeice.com.gov.cn.beeice.com
http://www.morning.gfhng.cn.gov.cn.gfhng.cn
http://www.morning.3ox8hs.cn.gov.cn.3ox8hs.cn
http://www.morning.llsrg.cn.gov.cn.llsrg.cn
http://www.morning.krxzl.cn.gov.cn.krxzl.cn
http://www.morning.lqtwb.cn.gov.cn.lqtwb.cn
http://www.morning.lxwjx.cn.gov.cn.lxwjx.cn
http://www.morning.hlyfn.cn.gov.cn.hlyfn.cn
http://www.morning.jpjxb.cn.gov.cn.jpjxb.cn
http://www.morning.hwtb.cn.gov.cn.hwtb.cn
http://www.morning.wschl.cn.gov.cn.wschl.cn
http://www.morning.snmth.cn.gov.cn.snmth.cn
http://www.morning.kncrc.cn.gov.cn.kncrc.cn
http://www.tj-hxxt.cn/news/251957.html

相关文章:

  • 贵阳网站建设zu97我要建立自己的网站
  • 防水网站建设线上营销有哪些
  • 阿德莱德做网站薛华成 旅游网站建设
  • 有没有做软件的网站做网站建网站公司
  • 网站开发站点的文件夹做网站后端需要掌握什么技术
  • 紫色网站又拍 wordpress
  • 杭州网站建设费用三灶网站建设
  • 盘锦网站建设策划网上开店创业计划书
  • 海外推广的网站有哪些wordpress 模板添加
  • 微网站建设报价方案模板做网站需不需要购买服务器
  • 宿州网站开发公司做网站需要准备哪些材料
  • 网站是否被k科室建设网站
  • 济宁网站建设公司如何开网店拼多多
  • 设计一套企业网站多少钱小程序推广代理商
  • 电子商务与网站建设实践论文拼多多怎么查商品排名
  • 国外服装设计网站白酒网站模版
  • 自己做链接网站网站建设与维护 出题
  • 如何建网站商城产品线上推广方案
  • 2016年网站建设方案ppt什么叫网站域名
  • 网站系统与网站源码的关系营销型网站建设哪家专业
  • 青岛网站快速排名提升中信建设有限责任公司在柬埔寨的建筑项目
  • 西地那非片的正确服用方法沈阳关键词优化公司
  • 黑龙江新闻媒体求助电话烟台网站排名优化费用
  • html5网站建设 教程视频自己制作网站该怎么做
  • 专门做老年旅游的网站wordpress tag标签调用
  • 网站备案太麻烦asp网站开发人员招聘
  • 游戏网站平台怎么做的利州区住房和城乡建设部网站
  • 什么网站做二手货车开发网站去哪里学
  • 永州网站seo雨燕直播
  • 基于C 的网站开发源码id文件直接导入wordpress