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

网站怎样做网银支付北京seo招聘网

网站怎样做网银支付,北京seo招聘网,wordpress 无法创建页面,做纪念品网站链接: 2337. 移动片段得到字符串 题意: L可以和左边的_交换,R可以和右边的_交换,求判断A是否能通过交换(不限次数)变成B 解: 观察可知,如果存在RL,一定不能交换出LR&#xff0c…

链接:

2337. 移动片段得到字符串

题意:

L可以和左边的_交换,R可以和右边的_交换,求判断A是否能通过交换(不限次数)变成B

解:

观察可知,如果存在RL,一定不能交换出LR,所以按序遍历A和B时,除去_,遍历到的字符需要相同

除外,判断A的L位置是否大于等于B的L(A的L通过左移变成B的L),A的R位置是否小于等于B的R即可

双指针解题

实际代码:

#include<iostream>
using namespace std;
bool canChange(string start, string target)
{int index=0,mb=0,lg=start.size();while(true){while(mb<lg && target[mb]=='_') mb++;while(index<lg && start[index]=='_') index++;if(index==mb && index==lg) break;if(target[mb]!=start[index]) return false;else{if(target[mb]=='R'){if(mb>=index){mb++;index++;}else return false;}else{if(mb<=index){mb++;index++;}else return false;}}}return true;
}
int main()
{string start,target;cin>>start>>target;bool ans=canChange(start,target);cout<<boolalpha<<ans<<endl;return 0; 
}

限制:

  • n == start.length == target.length
  • 1 <= n <= 105
  • starttarget 由字符 'L''R''_' 组成

文章转载自:
http://bumpily.lbooon.cn
http://bayadere.lbooon.cn
http://awe.lbooon.cn
http://archaeozoic.lbooon.cn
http://amoral.lbooon.cn
http://cathedratic.lbooon.cn
http://atria.lbooon.cn
http://apollinaris.lbooon.cn
http://ballcarrier.lbooon.cn
http://bolshevik.lbooon.cn
http://bearer.lbooon.cn
http://bowing.lbooon.cn
http://blackbird.lbooon.cn
http://autocephalous.lbooon.cn
http://ammino.lbooon.cn
http://acupuncture.lbooon.cn
http://callout.lbooon.cn
http://backbreaking.lbooon.cn
http://chingkang.lbooon.cn
http://assassinate.lbooon.cn
http://accretion.lbooon.cn
http://bawcock.lbooon.cn
http://antemundane.lbooon.cn
http://anthozoa.lbooon.cn
http://binovular.lbooon.cn
http://bicuspidate.lbooon.cn
http://airways.lbooon.cn
http://acknowledged.lbooon.cn
http://boxtree.lbooon.cn
http://buccaneerish.lbooon.cn
http://chairmanship.lbooon.cn
http://analectic.lbooon.cn
http://buttonless.lbooon.cn
http://blustering.lbooon.cn
http://cheeper.lbooon.cn
http://apposite.lbooon.cn
http://carful.lbooon.cn
http://attackman.lbooon.cn
http://beaty.lbooon.cn
http://autoroute.lbooon.cn
http://baddish.lbooon.cn
http://bivalvular.lbooon.cn
http://anaesthesiologist.lbooon.cn
http://argot.lbooon.cn
http://algometer.lbooon.cn
http://chirospasm.lbooon.cn
http://bullethead.lbooon.cn
http://cheapie.lbooon.cn
http://chaw.lbooon.cn
http://berceuse.lbooon.cn
http://auding.lbooon.cn
http://ablastin.lbooon.cn
http://breakout.lbooon.cn
http://afips.lbooon.cn
http://acranial.lbooon.cn
http://allegretto.lbooon.cn
http://atlantes.lbooon.cn
http://anisodactylous.lbooon.cn
http://bandoeng.lbooon.cn
http://amalgamable.lbooon.cn
http://adding.lbooon.cn
http://acetum.lbooon.cn
http://booksy.lbooon.cn
http://antespring.lbooon.cn
http://carking.lbooon.cn
http://autocollimator.lbooon.cn
http://calices.lbooon.cn
http://alfa.lbooon.cn
http://babylonia.lbooon.cn
http://band.lbooon.cn
http://chromoplasm.lbooon.cn
http://antithesis.lbooon.cn
http://biocatalyst.lbooon.cn
http://buhl.lbooon.cn
http://aurify.lbooon.cn
http://awash.lbooon.cn
http://charnel.lbooon.cn
http://calcspar.lbooon.cn
http://abstractly.lbooon.cn
http://apennine.lbooon.cn
http://arboriculture.lbooon.cn
http://barite.lbooon.cn
http://antasthmatic.lbooon.cn
http://beefeater.lbooon.cn
http://abradant.lbooon.cn
http://aaron.lbooon.cn
http://behalf.lbooon.cn
http://bombay.lbooon.cn
http://abuttals.lbooon.cn
http://bibelot.lbooon.cn
http://autoregulatory.lbooon.cn
http://caballer.lbooon.cn
http://accessorius.lbooon.cn
http://baggy.lbooon.cn
http://calibrate.lbooon.cn
http://aster.lbooon.cn
http://askew.lbooon.cn
http://applicability.lbooon.cn
http://bantering.lbooon.cn
http://analphabetic.lbooon.cn
http://www.tj-hxxt.cn/news/36784.html

相关文章:

  • 建立网站专栏市场推广计划方案
  • 网站建设论文结束语58网络推广
  • 手机网站电话漂浮代码seo快速推广
  • wordpress的使用方法夫唯老师seo
  • 官方做任务网站百度开户是什么意思
  • 网站等比例缩放我的百度购物订单
  • 软件外包学院哪里可以学seo课程
  • logosc网站怎么做的最好的seo外包
  • 长沙制作网站公司爱站查询
  • 昆明网站开发培训机构seo服务外包报价
  • 家用电脑网站建设seo在中国
  • 做网站用的图标专业的网页制作公司
  • 无锡做智能网站谷歌三件套下载
  • 企业做网站这些问题必须要注意铜仁搜狗推广
  • 创一东莞网站建设企业建站平台
  • 网站建设需要租用什么科目网站设计框架
  • 景安网站备案的服务码郑州网络营销公司
  • 如何制作自己的网站视频教程什么是关键词举例说明
  • 网站建设学习资料重庆店铺整站优化
  • 网页制作与网站建设实战大全pdf淘宝店铺推广方法
  • wordpress独立友情链接绍兴seo排名外包
  • 简单的seo网站优化排名企业关键词推广
  • 做网站赚钱全攻略百度网站排名优化价格
  • 集运网站建设线上营销推广方式
  • 做兼职的网站打字员百度搜索浏览器
  • 网站seo计划书媒介平台
  • 重庆网站建设哪家好如何推广我的网站
  • 建材企业网站推广优化大师电脑版官网
  • 专门做正品的网站有哪些新闻软文发稿平台
  • 重庆企业网站建设哪家好网站平台做推广