当前位置:网站首页>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
边栏推荐
- Summary of R & D technology
- Live delivery form template - automatically display pictures - automatically associate series products
- 和谐宿舍(线性dp / 区间dp)
- Machine learning - linear regression
- Sword finger offer: the median in the data stream (priority queue large top heap small top heap leetcode 295)
- What are instruction cycles, machine cycles, and clock cycles?
- Redis lost key and bigkey
- Logrus set log format and output function name
- What are the redis data types
- 数据安全问题已成隐患,看vivo如何让“用户数据”重新披甲
猜你喜欢

Leetcode 1547: minimum cost of cutting sticks

Basic theory of Flink

持续集成(CI)/持续交付(CD)如何彻底改变自动化测试

What are the redis data types

Redis data type usage scenario

直播带货表格模板-自动显示图片-自动关联系列商品

Set Chrome browser background to eye protection (eye escort / darkreader plug-in)
![[WinUI3]编写一个仿Explorer文件管理器](/img/3e/62794f1939da7f36f7a4e9dbf0aa7a.png)
[WinUI3]编写一个仿Explorer文件管理器

The WebService interface writes and publishes calls to the WebService interface (I)

How can continuous integration (CI) / continuous delivery (CD) revolutionize automated testing
随机推荐
Detailed explanation of hregionserver
A trinomial expression that causes a null pointer
[database] MySQL single table query
Discussion on flow restriction
The 2021 more reading report was released, and the book consumption potential of post-95 and Post-00 rose
独立站运营 | FaceBook营销神器——聊天机器人ManyChat
DIY 一个 Excel 版的子网计算器
Day. JS common methods
Live delivery form template - automatically display pictures - automatically associate series products
Repair of self calibration SPC failure of Tektronix oscilloscope dpo3054
Redis persistence
Mac enters MySQL terminal command
Progress of innovation training (IV)
Learning Android II from scratch - activity
2022/4/22
Download PDF from HowNet (I don't want to use CAJViewer anymore!!!)
Nacos source code startup error report solution
Set Chrome browser background to eye protection (eye escort / darkreader plug-in)
Perfect test of coil in wireless charging system with LCR meter
Define defines constants and macros, pointers and structures