没发现规律,直接遍历比较的。。。神奇的过了。。。 摘要: #include using namespace std; int main(){ string s1, s2; cin >…… 题解列表 2021年03月31日 0 点赞 0 评论 263 浏览 评分:0.0
c语言巧妙解答(小白) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char a[1001]; char b[1001]; gets(a); g…… 题解列表 2021年12月28日 1 点赞 0 评论 255 浏览 评分:0.0
蓝桥杯历届试题-翻硬币 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> #include<cstring> using namespace std; const …… 题解列表 2018年03月31日 0 点赞 0 评论 1253 浏览 评分:0.0
python-翻硬币 摘要:解题思路:设输入的两个字符串为s和e。对s中的一位进行遍历,如果s[i] != e[i],则同时翻转s[i]和s[i+1]。注意事项:参考代码:def f(s,e): cnt = 0 …… 题解列表 2022年02月14日 0 点赞 0 评论 391 浏览 评分:0.0
题目-翻硬币 摘要:参考代码:#include"bits/stdc++.h" using namespace std; bool a[11111]; bool b[11111]; long long ans…… 题解列表 2022年03月18日 0 点赞 0 评论 185 浏览 评分:0.0
历届试题-翻硬币 摘要:从最左侧开始遍历,如果该位置硬币状态与目标不同,就翻动该位置和该位置后面的两枚硬币。因为题目说了有解,所以遍历到倒数第二枚的时候,所有硬币状态就与目标相同了。这个方法也有点贪心的思路,每次追求当前位置…… 题解列表 2024年01月26日 0 点赞 0 评论 233 浏览 评分:0.0
蓝桥杯历届试题-翻硬币(C++) 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>#include <string>using namespace std;int main(){ char a[10…… 题解列表 2024年02月24日 0 点赞 0 评论 125 浏览 评分:0.0
随便写写,记录一下 摘要:```python def turn_the_coin(s1, s2): new_s1 = list(s1) new_s2 = list(s2) change_func…… 题解列表 2024年03月27日 0 点赞 0 评论 293 浏览 评分:0.0
蓝桥杯历届试题-翻硬币 摘要:参考代码:#include<bits/stdc++.h> using namespace std; vector<int>v; int main() { string s,ss; ci…… 题解列表 2024年04月02日 0 点赞 0 评论 153 浏览 评分:0.0
蓝桥杯历届试题-翻硬币(贪心) 摘要:#include <iostream> #include <cstring> using namespace std; const int N = 110; int n; char …… 题解列表 2024年04月12日 0 点赞 0 评论 182 浏览 评分:0.0