背包问题变体 将单一传递性转为服务于条件的搭配组合 摘要:声明:代码收教于[Lyrith_with_xQ](https://www.luogu.com.cn/problem/solution/P12160 "Lyrith_with_xQ")1.先读题目…… 题解列表 2025年05月13日 0 点赞 0 评论 514 浏览 评分:0.0
3088,后序遍历 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <string.h>void build_postorder(char *pre, char…… 题解列表 2025年05月14日 0 点赞 0 评论 374 浏览 评分:0.0
3089:扩展二叉树 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>typedefstruct&nb…… 题解列表 2025年05月15日 0 点赞 0 评论 374 浏览 评分:0.0
.。。。。。 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>#include<vector>using namespac…… 题解列表 2025年05月15日 0 点赞 0 评论 562 浏览 评分:0.0
DFS集合set实现 摘要:解题思路: 用集合,记载路径中的字符。结合深度优先搜索实现。注意事项:参考代码://LETTERS 深搜与回溯#include <bits/s…… 题解列表 2025年05月16日 0 点赞 0 评论 426 浏览 评分:0.0
2046输出全排列 c++:next_permutation()与do while笔记 摘要:解题思路:next_permutation()给出下一个序列在全排列中的下一个序列注意事项:参考代码:#include<bits/stdc++.h>using namespac…… 题解列表 2025年05月16日 0 点赞 0 评论 367 浏览 评分:0.0
1815排列序数 C++:next_permutation()与do while 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s;&n…… 题解列表 2025年05月16日 0 点赞 0 评论 390 浏览 评分:0.0
2549单词统计 C ++: string和substr()笔记 摘要:解题思路:读取输入字符串和单词。检查单词长度是否大于字符串长度,如果是则输出0。遍历所有可能的起始位置,取出子串与单词比较,统计匹配次数。输出统计结果。注意事项:参考代码:#include <b…… 题解列表 2025年05月16日 0 点赞 0 评论 454 浏览 评分:0.0
迷宫BFS实现 摘要:解题思路: 设置好队列结点,结构体类型,包含坐标,以及路径。注意事项: 坐标偏移量,左下右上设置…… 题解列表 2025年05月18日 0 点赞 0 评论 425 浏览 评分:0.0
【STL】美国大选,使用STL库中的vector来解决 摘要:输入处理:循环读取输入的州数 n,直到 n=0 时终止。对于每个 n,读取 n 个州的选民数并存储在 vector 中。输入验证:州的数量 n 必须在 [1, 100] 之间。每个…… 题解列表 2025年05月18日 0 点赞 0 评论 522 浏览 评分:0.0