数组记录,双指针循环,小白能看懂 摘要:解题思路:记录c1,c2在s中出现的位置和次数,用双指针循环,时间复杂度on注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef l…… 题解列表 2024年03月26日 0 点赞 0 评论 337 浏览 评分:0.0
蓝桥杯算法提高VIP-摆花 摘要:解题思路:注意事项:参考代码:n, m= map(int, input().split())t = [0]+list(map(int, input().split()))dp=[[0]*(m+1) f…… 题解列表 2024年03月26日 0 点赞 0 评论 176 浏览 评分:0.0
欧拉函数模板 摘要:参考代码: // 欧拉函数: φ(n) = n * (1 - 1/p1) * (1 - 1/p2) * ... * (1 - 1/pk) // 对于任意两个互质的正整数m和n,有φ(mn) = …… 题解列表 2024年03月27日 0 点赞 0 评论 251 浏览 评分:0.0
随便写写,记录一下 摘要:```python def turn_the_coin(s1, s2): new_s1 = list(s1) new_s2 = list(s2) change_func…… 题解列表 2024年03月27日 0 点赞 0 评论 297 浏览 评分:0.0
排序问题(2) 摘要:解题思路:注意事项:参考代码:a=list(map(int,input().split()))a.sort()b=a[::-1]for i in b: print(i,end=' …… 题解列表 2024年03月27日 0 点赞 0 评论 185 浏览 评分:0.0
pythonsfrbtrhtrhhfgbfdbfb 摘要:解题思路:注意事项:参考代码:t = int(input()) ans = 0for i in range(t): s = input() a = s.split() if a[0]=…… 题解列表 2024年03月27日 0 点赞 0 评论 232 浏览 评分:0.0
匹配字符串的个数 摘要: #include #include int main() { char s1[6]; char s2[81]; …… 题解列表 2024年03月27日 0 点赞 0 评论 225 浏览 评分:0.0
结构体输出成绩统计 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>struct stu{ char num[50]; char name[50]; …… 题解列表 2024年03月27日 0 点赞 0 评论 226 浏览 评分:0.0
猴子吃桃递归 摘要:话不多说直接进入正题 import java.util.Scanner; public class Main { public static voi…… 题解列表 2024年03月27日 0 点赞 0 评论 229 浏览 评分:0.0
猪鼻巴巴暴力法 摘要:解题思路:定义俩数组,一个是上一天,一个是今天上一天的每个点都判断,有细菌就把变化赋给今天的数组(有细菌就周围全加一倍自己加两倍),意思是只把变化赋给今天,昨天本来位置留着的细菌都四妹了然后把今天的再…… 题解列表 2024年03月27日 0 点赞 0 评论 203 浏览 评分:0.0