1311: 数字三角形 通过递归函数dfs来进行深度优先搜索 摘要:解题思路:代码中定义了一个二维数组dp来存储三角形的数值。然后,通过递归函数dfs来进行深度优先搜索。函数中的参数p1表示当前所在的行数,p2表示当前所在的列数,sum表示当前路径的和。在递归函数中,…… 题解列表 2024年04月08日 0 点赞 0 评论 650 浏览 评分:9.9
2571: 蓝桥杯2020年第十一届省赛真题-回文日期 摘要:**部分正确的话,可能要注意到的一些暗含条件:** 1.‘ABABBABA’型回文串中A与B不能相等 2.输出日期必须大于输入日期 ```cpp #include #include u…… 题解列表 2024年04月08日 0 点赞 0 评论 714 浏览 评分:0.0
最少刷题数 c++ 摘要: #### 思路 1. 数组排序,求中位数的**下标**mid,mid必须满足mid左边数的个数要大于等于mid右边数的个数 2. 对于每一个ai,设修改后的ai为nx,依照题意,需要求最小的n…… 题解列表 2024年04月08日 0 点赞 0 评论 495 浏览 评分:0.0
编写题解 1782: 找出最长的字符串来 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <string.h> int main() { char strings[5][101]; /…… 题解列表 2024年04月08日 0 点赞 0 评论 397 浏览 评分:0.0
2179: 信息学奥赛一本通T1256-献给阿尔吉侬的花束 摘要:解题思路: 标准BFS , 数组实现Que注意事项:计算距离时, nd.x, nd.y 不是x, y参考代码:#include<iostream> #include<cstring> using …… 题解列表 2024年04月08日 0 点赞 0 评论 339 浏览 评分:6.0
编写题解 1546: 蓝桥杯算法提高VIP-班级排名 摘要:解题思路:注意事项:参考代码: #include<stdio.h>int main(){ int n, m, d, q = 0, ar[100] = { 0 }; char arr[…… 题解列表 2024年04月08日 0 点赞 0 评论 366 浏览 评分:0.0
使用ArrayLsit链表,普通for循环 摘要:解题思路:注意事项:参考代码:import java.util.*; public class Main { public static void main(String[] args…… 题解列表 2024年04月07日 0 点赞 0 评论 325 浏览 评分:0.0
C++ 桶和贪心 摘要:解题思路:利用桶记录每一种情况的数量 再用贪心找出最多的一个 但是得特判一下k为0的情况注意事项:参考代码:#include<iostream>#define int long longusing n…… 题解列表 2024年04月07日 0 点赞 0 评论 372 浏览 评分:0.0
C++ 记忆化存储 摘要:解题思路:利用一个数组记录最长的接龙数组的长度 详细在注释注意事项:参考代码:#include<bits/stdc++.h>#define int long longusing namespace s…… 题解列表 2024年04月07日 0 点赞 0 评论 553 浏览 评分:0.0
不与最大数相同的数字之和 摘要:解题思路:先把数列中的全部数相加,最后再减去最大值就ok了注意事项:注意范围参考代码:n = int(input())a = list(map(int,input().split()))sum=0fo…… 题解列表 2024年04月07日 0 点赞 0 评论 447 浏览 评分:0.0