这题py的测试用例有点问题(已过蓝桥官网)AC 摘要:解题思路:前缀和、差分的综合使用比如求区间和,在某个区间都加上1,不建议求更新数组后的和使再次使用前缀和求区间和,因为会多几次循环会超时,建议直接元素相乘可以少几次循环即可AC 代码有详细注释注意事项…… 题解列表 2023年03月26日 0 点赞 0 评论 593 浏览 评分:9.9
除了数组,的其他两种解法 摘要:解题思路:一种通俗易懂易学,一种是优化后的解法 总体思路就是简单的求位数数字的数学方法,先/后%就行注意事项:细心就行,主要要把循环结构每一步的循环结构弄明白才行参考代码:数组解法入下#include…… 题解列表 2023年03月26日 0 点赞 0 评论 213 浏览 评分:0.0
IP判断——python 摘要:解题思路:注意事项:参考代码:while True: try: L = list(map(str,input().split('.'))) s = 0…… 题解列表 2023年03月26日 0 点赞 0 评论 188 浏览 评分:0.0
编写题解 1030: [编程入门]二维数组的转置 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int arr[3][3]; for(int i = 0;i<3;i++) …… 题解列表 2023年03月26日 0 点赞 0 评论 120 浏览 评分:0.0
列出最简真分数序列* 摘要:解题思路:注意事项:求余2与求余5要分开来,我也不太清楚为什么不能用or,望有知道的人可以解答一下,谢谢参考代码:L = [i for i in range(1,40)]for i in L: …… 题解列表 2023年03月26日 0 点赞 0 评论 223 浏览 评分:0.0
蓝桥杯2021年第十二届省赛真题-双向排序 摘要:解题思路:注意事项:参考代码:#include <iostream>#include <cstring>#include <algorithm>#include <cmath>using namesp…… 题解列表 2023年03月26日 0 点赞 0 评论 825 浏览 评分:9.9
密码——python 摘要:解题思路:注意事项:参考代码:n = int(input())for i in range(n): a = str(input()) s = 0 for i in a: …… 题解列表 2023年03月26日 0 点赞 0 评论 212 浏览 评分:0.0
个人觉得还是这个最容易理解 摘要:解题思路:三目运算注意事项:记住三目运算的规则与写法——z? a:b;(z是表达式)如果表达式成立,答案是a,反之是b;参考代码:#include<stdio.h>#include<math.h>in…… 题解列表 2023年03月26日 0 点赞 0 评论 179 浏览 评分:0.0
【蓝桥杯】二分法求解--分巧克力 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; typedef long long ll; const int vinf = 100…… 题解列表 2023年03月26日 0 点赞 0 评论 208 浏览 评分:0.0
蟠桃记——计算原来的桃子数 摘要:解题思路:逆向思维注意事项:参考代码:while True: try: n = int(input()) s = 1 for i in range(n-…… 题解列表 2023年03月26日 0 点赞 0 评论 267 浏览 评分:0.0