蓝桥杯历届试题-翻硬币 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> #include<cstring> using namespace std; const …… 题解列表 2018年03月31日 0 点赞 0 评论 1108 浏览 评分:0.0
蓝桥杯历届试题-翻硬币 (Java代码) 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main {public static void main(String[] args) { …… 题解列表 2019年03月06日 0 点赞 1 评论 485 浏览 评分:0.0
历届试题-翻硬币 摘要:从最左侧开始遍历,如果该位置硬币状态与目标不同,就翻动该位置和该位置后面的两枚硬币。因为题目说了有解,所以遍历到倒数第二枚的时候,所有硬币状态就与目标相同了。这个方法也有点贪心的思路,每次追求当前位置…… 题解列表 2024年01月26日 0 点赞 0 评论 100 浏览 评分:0.0
蓝桥杯历届试题-翻硬币 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <strings.h>int main(){ char str1[100],str2[100]; int…… 题解列表 2018年01月26日 0 点赞 0 评论 752 浏览 评分:0.0
蓝桥杯历届试题-翻硬币 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>int main() { int i, count = 0; char ch_sta…… 题解列表 2019年03月20日 0 点赞 0 评论 426 浏览 评分:0.0
没发现规律,直接遍历比较的。。。神奇的过了。。。 摘要: #include using namespace std; int main(){ string s1, s2; cin >…… 题解列表 2021年03月31日 0 点赞 0 评论 205 浏览 评分:0.0
随便写写,记录一下 摘要:```python def turn_the_coin(s1, s2): new_s1 = list(s1) new_s2 = list(s2) change_func…… 题解列表 2024年03月27日 0 点赞 0 评论 160 浏览 评分:0.0
蓝桥杯历届试题-翻硬币-题解(C++代码)这题有点水。。 摘要:解题思路:感觉这个题出的都有问题,它只给出了特殊的正确的情况,没有一些错的,比如:这个串*o**o***o*** 变成这个串 *o******o*** 的情况,因为如果根据题目中要改变相邻的两个字符…… 题解列表 2020年08月22日 0 点赞 0 评论 333 浏览 评分:0.0
蓝桥杯历届试题-翻硬币(贪心) 摘要:#include <iostream> #include <cstring> using namespace std; const int N = 110; int n; char …… 题解列表 2024年04月12日 0 点赞 0 评论 115 浏览 评分:0.0
蓝桥杯历届试题-翻硬币(代码虽有点长,但便于理解) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i,left,right,n,sum=0;//left是一步操作…… 题解列表 2022年02月01日 0 点赞 0 评论 187 浏览 评分:0.0