贝茜的训练-模拟 摘要:解题思路:模拟注意事项:参考代码:#include<iostream>usingnamespacestd;intm,t,u,f,d,…… 题解列表 2025年05月03日 0 点赞 0 评论 370 浏览 评分:0.0
c++简单解题思路 解题思路:multiset容器可以自动有序排列数据,count可以统计相同数据的个数注意事项:参考代码:#include#includeusingnamespacestd;intmain(intargc,charconst*argv[]){intn;inta, 题解列表 2025年05月03日 0 点赞 0 评论 438 浏览 评分:0.0
马拦过河卒:深搜 摘要:解题思路:深搜注意事项:参考代码:#include<iostream>usingnamespacestd;constintN&nbs…… 题解列表 2025年05月03日 0 点赞 0 评论 398 浏览 评分:0.0
画展布置-排序 解题思路这个问题要求我们从N幅画中选择M幅,并排列它们,使得相邻画作艺术价值平方的差的绝对值之和最小。首先,我们可以观察到,对于任意两幅画的艺术价值a和b,|a²-b²|=|a-b|·|a+b|。这意味着,如果我们想要最小化|a²-b²|,我们应该选择艺术价值接近的画作放在相邻位置。 题解列表 2025年05月02日 3 点赞 0 评论 1134 浏览 评分:6.0
防御导弹-DP(最长下降子序列) 摘要:解题思路:DP(最长下降子序列)注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;const…… 题解列表 2025年05月02日 0 点赞 0 评论 409 浏览 评分:0.0
金明的预算方案(DP+邻接表) 摘要:解题思路:DP (分别考虑只拿主件, 主件+ 1附件, 主件 + 2附件)注意事项:参考代码:#include<bits/stdc++.h>usingnamespace&n…… 题解列表 2025年05月02日 0 点赞 0 评论 400 浏览 评分:0.0
邮局选址问题:贪心策略-横纵坐标中位数 摘要:解题思路: 贪心策略, 横纵坐标中位数注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;const&nb…… 题解列表 2025年05月02日 0 点赞 0 评论 352 浏览 评分:0.0
三种方法求解斐波那契数列 摘要:方法一:递推法#include<bits/stdc++.h>usingnamespacestd;intmain(){&nbs…… 题解列表 2025年05月01日 0 点赞 0 评论 551 浏览 评分:10.0
明明的随机数(set容器自动排序和去重) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){&…… 题解列表 2025年05月01日 1 点赞 0 评论 502 浏览 评分:10.0
数列排序(C++)笔记 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ …… 题解列表 2025年05月01日 1 点赞 0 评论 555 浏览 评分:0.0