#C++3151—— 蓝桥杯2023年第十四届省赛真题-飞机降落 摘要:解题思路已经标注在代码旁边了,就是用深搜的思想去模拟每一架飞机降落的过程,为了方便处理,采用了 vector 容器和结构体(类)。祝大家快乐学习每一天,开开心心打比赛!AC代码:#include<bi…… 题解列表 2024年03月30日 0 点赞 0 评论 721 浏览 评分:0.0
子串简写的两种解题思路:1:前缀和O(n);2:双指针O(n) 摘要:解题思路:对于前缀和,我们用L和R表示字符串的左端点和右端点;我们用一个前缀和数组s[N]来维护a出现的次数,表示在第i位之前有多少个a。处理完后直接将字符串从后往前枚举,如果找到一个b,则可以匹配前…… 题解列表 2024年03月30日 0 点赞 0 评论 645 浏览 评分:0.0
比较简单的一种方法 摘要:解题思路:先看题目,找出规律注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int n,i,cnt=0; long int a[3000]…… 题解列表 2024年03月30日 0 点赞 0 评论 510 浏览 评分:9.9
编写题解 2885: 矩阵转置 摘要:解题思路: 刷题过程中发现的快速转置方法注意事项:参考代码:n,m=map(int,input().split())a=[]for _ in range(n): a.append(i…… 题解列表 2024年03月30日 0 点赞 0 评论 433 浏览 评分:0.0
2604: 蓝桥杯2021年真题-砝码称重(unordered_set) 摘要:##unordered_set **又学到了一个重要的数据结构!! unordered_set:用于存放无序、不重复的数据(重复数据会被自动过滤) set:用于存放有序、不重复的数据 unor…… 题解列表 2024年03月30日 5 点赞 0 评论 871 浏览 评分:9.9
绝对值排序(动态内存分配(calloc) 摘要:解题思路:注意事项:参考代码#include<stdio.h>#include<stdlib.h>int main(){ int i,j,n,*p,*t; scanf("%d",&n); while(…… 题解列表 2024年03月30日 0 点赞 0 评论 456 浏览 评分:9.9
c++暴力枚举时间统计 摘要:解题思路:枚举1000秒内所有情况,再利用map记录x y的最大情况注意事项:参考代码:#include<bits/stdc++.h>#define int long longusing namesp…… 题解列表 2024年03月30日 0 点赞 0 评论 373 浏览 评分:0.0
发工资咯(Java题解+递归+数组) 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { // 定义人民币面额数组 static int[] denomina…… 题解列表 2024年03月30日 0 点赞 0 评论 428 浏览 评分:6.0
python drgrregrg 摘要:解题思路:注意事项:参考代码:n = int(input())c, w ,t = 1, 1, 1while t < n: c += 1 w = 3*w t += w print…… 题解列表 2024年03月30日 0 点赞 0 评论 344 浏览 评分:0.0
最简单的解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int i=1; long long j=1,sum=0; for…… 题解列表 2024年03月30日 0 点赞 0 评论 352 浏览 评分:0.0