dfs #1440: 蓝桥杯2013年第四届真题-带分数 摘要:# 7.带分数 100可以表示为 100=3+69258/714 这种表示形式当中,数字1~9分别只出现一次 可以看成一个数字1~9的全排列 我们只需要在当前全排列中 找出三段数字 满…… 题解列表 2024年11月22日 0 点赞 1 评论 190 浏览 评分:9.9
完全背包问题,记忆化搜索,不能暴力了呜呜呜呜呜 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义全局变量,m表示背包容量,n表示物品数量,h初始化为-1 int…… 题解列表 2024年11月21日 0 点赞 0 评论 112 浏览 评分:0.0
通过将三位数转换为字符串直接for循环输出数组即可 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ int a; cin>>a; …… 题解列表 2024年11月21日 0 点赞 0 评论 129 浏览 评分:0.0
2038: 简化型背包,暴力搜索 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义全局变量v, m和h,并初始化h为-1 int v,m,h=-1…… 题解列表 2024年11月21日 0 点赞 0 评论 127 浏览 评分:0.0
二维数组的转置 摘要:#include<bits/stdc++.h> using namespace std; void f(int a[4][4]) { for(int i=1;i<=3;i++) { …… 题解列表 2024年11月21日 1 点赞 0 评论 288 浏览 评分:9.9
自定义函数处理素数 摘要:#include<bits/stdc++.h> using namespace std; bool is_prime(int x) { if(x<=1)return false; …… 题解列表 2024年11月21日 2 点赞 0 评论 641 浏览 评分:9.9
求矩阵的两对角线上的元素之和 摘要:#include<bits/stdc++.h> using namespace std; int main() { int a[12][12]; int n;cin>>n; …… 题解列表 2024年11月21日 0 点赞 0 评论 235 浏览 评分:9.9
矩阵对角线求和 摘要:#includeusing namespace std; int main() { int a[10][10]; for(int i=1;i<=3;i++) for(int…… 题解列表 2024年11月21日 0 点赞 0 评论 555 浏览 评分:9.9
格式化输出用printf #2609: 蓝桥杯2021年第十二届省赛真题-时间显示 摘要:``` #define _CRT_SECURE_NO_WARNINGS 1 #include #include #include #include #include #include …… 题解列表 2024年11月21日 0 点赞 0 评论 181 浏览 评分:0.0
数组插入处理 摘要:#includeusing namespace std; int main() { int a[10]; for(int i=0;i>a[i]; int x,m;…… 题解列表 2024年11月21日 1 点赞 0 评论 419 浏览 评分:9.9