当前位置:网站首页>Flip coin (Blue Bridge Cup)
Flip coin (Blue Bridge Cup)
2022-04-23 05:08:00 【FOWng_ lp】



AC code
#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
string a,b;
int l=-1,r,ans;
int main(){
cin >> a >> b;
for(int i = 0;i < a.size();i++){
if(a[i]!=b[i]){
if(l==-1)l = i;
else {
ans += (i-l);
l=-1;
}
}
}
cout << ans << endl;
return 0;
}
版权声明
本文为[FOWng_ lp]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220549345557.html
边栏推荐
- Innovation training (II) task division
- Other problems encountered in debugging fingerprints
- Using MySQL with Oracle
- Discussion on flow restriction
- Learning Android from scratch -- baseactivity and activitycollector
- L2-011 play binary tree (build tree + BFS)
- Informatics Olympiad 1955: [11noip popularization group] Swiss round | openjudge 4.1 4363: Swiss round | Luogu p1309 [noip2011 popularization group] Swiss round
- Chapter II project scope management of information system project manager summary
- [2022 ICLR] Pyramid: low complexity pyramid attention for long range spatiotemporal sequence modeling and prediction
- C. Tree Infection(模拟+贪心)
猜你喜欢

MySQL memo (for your own query)

Deep learning notes - object detection and dataset + anchor box

#define 定义常量和宏,指针和结构体

Define defines constants and macros, pointers and structures

Learning Android from scratch -- Introduction
![Solve valueerror: argument must be a deny tensor: 0 - got shape [198602], but wanted [198602, 16]](/img/99/095063b72390adea6250f7b760d78c.png)
Solve valueerror: argument must be a deny tensor: 0 - got shape [198602], but wanted [198602, 16]

Perfect test of coil in wireless charging system with LCR meter

【数据库】MySQL多表查询(一)

Uglifyjs compress JS

数据安全问题已成隐患,看vivo如何让“用户数据”重新披甲
随机推荐
PHP counts the number of files in the specified folder
DIY 一个 Excel 版的子网计算器
MySQL - index
What are the redis data types
In aggregated query without group by, expression 1 of select list contains nonaggregated column
Servlet3 0 + event driven for high performance long polling
Download PDF from HowNet (I don't want to use CAJViewer anymore!!!)
The WebService interface writes and publishes calls to the WebService interface (2)
[database] MySQL basic operation (basic operation ~)
Machine learning - linear regression
和谐宿舍(线性dp / 区间dp)
JS engine loop mechanism: synchronous, asynchronous, event loop
HRegionServer的详解
Field injection is not recommended using @ Autowired
深度学习笔记 —— 微调
Other problems encountered in debugging fingerprints
Detailed explanation of concurrent topics
Deep learning notes - semantic segmentation and data sets
MySQL realizes row to column SQL
Chapter III project schedule management of information system project manager summary