题解 1099: 校门外的树 摘要:解题思路:注意事项:参考代码:l,m=map(int,input().split())x=[]for i in range(0,m): a,b=map(int,input().split()) …… 题解列表 2024年03月26日 0 点赞 0 评论 181 浏览 评分:0.0
3150: 蓝桥杯2023年第十四届省赛真题-冶炼金属 摘要:解题思路:由题意可知,通过观察与计算得知,所有A/B得出的结果的最小值即为输出的第二个数据的最大值同理可知第一个数据可用A/(B+1)得出,即求得的最大值即为第一个数据的最小值但由于第一个输出数据是通…… 题解列表 2024年03月26日 0 点赞 0 评论 288 浏览 评分:0.0
简单数学算法 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;#include <iomanip>#include <cmath>int main(){ …… 题解列表 2024年03月26日 0 点赞 0 评论 167 浏览 评分:0.0
第十四届省赛真题-子串简写踩坑记录 摘要:坑真的很多,最开始是用两个for嵌套用暴搜然后超时了,改了这种方法,一踩一个坑。先全部找出C1C2的位置并且记录数量,用C1的位置比对C2的位置,找到C1位置+K-1大于大于C2位置的时候,就把往后的…… 题解列表 2024年03月26日 0 点赞 0 评论 220 浏览 评分:0.0
数组记录,双指针循环,小白能看懂 摘要:解题思路:记录c1,c2在s中出现的位置和次数,用双指针循环,时间复杂度on注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef l…… 题解列表 2024年03月26日 0 点赞 0 评论 331 浏览 评分: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 评论 171 浏览 评分:0.0
欧拉函数模板 摘要:参考代码: // 欧拉函数: φ(n) = n * (1 - 1/p1) * (1 - 1/p2) * ... * (1 - 1/pk) // 对于任意两个互质的正整数m和n,有φ(mn) = …… 题解列表 2024年03月27日 0 点赞 0 评论 247 浏览 评分:0.0
随便写写,记录一下 摘要:```python def turn_the_coin(s1, s2): new_s1 = list(s1) new_s2 = list(s2) change_func…… 题解列表 2024年03月27日 0 点赞 0 评论 289 浏览 评分: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 评论 181 浏览 评分: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 评论 229 浏览 评分:0.0