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

网站建设用户需求分析如何做电商网站 昆明

网站建设用户需求分析,如何做电商网站 昆明,网站优化流程,wordpress 微信卡券题意#xff1a; 给你两个01串#xff0c;经过两种操作#xff0c;1.直接让第一串经过操作变成目标串#xff1b;2.可以点击空白处#xff0c;即0的地方#xff0c;使得操作串全部清空为0串#xff0c;再变为目标串#xff1b;最终比较两种方式#xff0c;哪种需更少…题意 给你两个01串经过两种操作1.直接让第一串经过操作变成目标串2.可以点击空白处即0的地方使得操作串全部清空为0串再变为目标串最终比较两种方式哪种需更少步骤输出每步点击的位置。 来源牛客网 时间限制C/C 1秒其他语言2秒 空间限制C/C 65536K其他语言131072K 64bit IO Format: %lld 题目描述 The party began, the greasy uncle was playing cards, the fat otaku was eating, and the little beauty was drawing. Playing cards is an indispensable and irreplaceable activity for parties. In order to be more impartial and prevent magician YHH from cheating when shuffling cards, and give full play to his mind-reading advantages at the same time, psychologist ZH proposed to use a pad to play cards. However, ZH found that the touch screen of the pad he was assigned was malfunctioning. Every time he clicked a card, this card and all the cards behind it would be selected. As we all know, the effect of choosing a card is equivalent to changing the state of the card, that is, if the card was initially selected, it would become unselected, and if it was unselected, it would become selected. Besides, there is another operation, which is to click on the blank space, so that all the cards will become unselected. Now ZH needs to select some cards to play, but due to the malfunctioning of the touch screen, he cannot simply choose the cards he wants to choose. Now he has used the blind trick to secretly ask netizens which positions to click to choose the cards he wants, please help him! Given two 01-strings a and b, which represent the current state of the card and the state required by ZH. 0 represents unselected, and 1 represents selected. Now you are asked to give a plan with the smallest number of tap times. 输入描述: There are multiple test cases. The first line of input contains an integer T (1 ≤ T ≤ 10), indicating the number of test cases. For each test case: The first line contains a string a (1 ≤ |a| ≤ 10^510 5 ), indicating the current state of the card. The second line contains a string b (|b| |a|), indicating the state required by ZH. 输出描述: For each test case, print one line contains the minimum number of integers indicating the position ZH should tap in non-decreasing order. Please note that number 0 is indicating the blank space, and it’s guaranteed that the solution of all the test cases is unique. 示例1 输入 2 10110 10000 110101 000000 输出 3 5 0 说明 For the first sample, a is “10110”, and b is “10000”, then ZH needs first to tap the position 3 (based on 1) to make the state become “10001”, and then tap the position 5 to make the state become “10000”, so you should tell him 3 and 5. 分析 直接暴力遍历标记两种方式的状态最后比较步数直接输出即可。 AC代码 #includestdio.h #includestring.h #includealgorithm using namespace std; const int M1e510; int t,tot,num; char a[M],b[M]; bool vis1[M],vis2[M]; int main() {scanf(%d,t);while(t--){totnum0;memset(vis1,false,sizeof(vis1));memset(vis2,false,sizeof(vis2));scanf(%s%s,a1,b1);int lstrlen(a1);for(int i1; il; i){int ub[i]-0;if(num%2!u){num;vis1[i]true;}}for(int i1; il; i){int ua[i]-0;int vb[i]-0;if((utot)%2!v){tot;vis2[i]true;}}if(num1tot){printf(0);for(int i1; il; i)if(vis1[i])printf( %d,i);printf(\n);}else{bool flagfalse;for(int i1; il; i)if(vis2[i]){if(!flag)printf(%d,i),flagtrue;elseprintf( %d,i);}printf(\n);}}return 0; }
http://www.pierceye.com/news/693604/

相关文章:

  • 旅游网站建设的概念ppt模板自己制作
  • 重庆网站建设首选承越网站开发建设方案
  • 创建一个网站的费用网站服务器租用报价
  • 潍坊企化网站建设大型免费网站制作
  • 松原网站制作网页制作的基本步骤流程
  • 太原网站建设制作机构西安网络seo公司
  • 移动网站建设报价表抖音代运营商
  • 镇平县两学一做网站服装网站建设推荐
  • 苏州建网站的公wordpress添加侧栏广告
  • 企业商城网站 .networdpress模板作者怎样去除
  • 强生网站还要怎样做衡水网站推广的网络公司
  • 茂名建站公司南通长城建设集团有限公司网站
  • 网络平台怎么建立网站吗做暧暧视频网站安全吗
  • 免费域名x网站网站前期准备工作
  • 陕西网站建设公司排名智能优化网站
  • 做瞹瞹网站萍乡做网站的公司有哪些
  • 网站建设的类型有几种wordpress搜索返回页面内容
  • 建设网站备案与不备案区别招远建网站首选公司
  • 四川住房和城乡建设厅网站三类人员软文网站备案如何查询
  • 个人与企业签订网站开发合同网页制作教程实例
  • 做网站遇到竞争对手怎么办wordpress中文版邮件发送
  • 美橙互联旗下网站渐变网站
  • 做网站域名需要在哪里备案微信答题小程序
  • 购物网站页面布局个人站长做导航网站
  • wordpress 增强编辑器网站暂时关闭 seo
  • 重庆网站设计开发培训广西省住房和城乡建设厅官网
  • 购物网站模板免费下载网站排名快速提升工具
  • 中山制作网站的公司滨江区网站开发公司
  • 申请建设工作网站的函酒店网站建设方案策划方案
  • 宠物店网站模板你是网站设计有限公司的项目经理