信息学奥赛一本通T1267-01背包问题,暴力搜索! 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义全局变量 int m, n, a1[1210], a2[1210…… 题解列表 2024年11月16日 0 点赞 1 评论 514 浏览 评分:8.0
1033: [编程入门]自定义函数之字符提取 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;void find(string s){ for (int i=0;s[i]!='\…… 题解列表 2024年11月15日 1 点赞 0 评论 640 浏览 评分:9.9
八皇后,来看看吧真的很详细了 摘要:解题思路:特别注意右对角线不能写X-Y哦!n*n的棋盘大小也就是能放n个皇后数组大小要定义30以上哦参考代码:#include"bits/stdc++.h" using namespace std;…… 题解列表 2024年11月15日 2 点赞 0 评论 841 浏览 评分:0.0
1757: 矩阵对角求和 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std; int main(){ int n, sum=0, num=0; int ar…… 题解列表 2024年11月15日 0 点赞 1 评论 451 浏览 评分:0.0
信息学奥赛一本通T1440-数的划分,思路清晰暴力! 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 全局变量声明 int n, k, jjj = 0; // n: 目标…… 题解列表 2024年11月15日 0 点赞 0 评论 696 浏览 评分:9.9
一直83直到我把输出-1的语句放在外面 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,count=0; cin>>n; for(int i=1…… 题解列表 2024年11月14日 1 点赞 0 评论 624 浏览 评分:9.9
只用了for循环和冒泡排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;#define N 10int main(){ int a[N]; in…… 题解列表 2024年11月14日 1 点赞 0 评论 749 浏览 评分:10.0
火柴棒等式,暴力dfs 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 全局变量声明 int n, a[10005], b[10005] =…… 题解列表 2024年11月14日 1 点赞 0 评论 450 浏览 评分:0.0
发工资咯 记way #includeusingnamespacestd;intdir[]={100,50,10,5,2,1};intmain(){intn,m,ans;while(cin>>n&&n){ans=0;while(n--){cin>>m;for(inti=0;i<6&&m;++i){ans+=m/dir[i] 题解列表 2024年11月14日 0 点赞 0 评论 620 浏览 评分:0.0
1107: 纪念品分组 摘要:解题思路:动态数组:vector<int>p(n)sort 对数组进行降序排序两重遍历,只要两项加起来小于等于w,就分为一组已分配好的纪念品置成-1(价格不会达到的数)第一重遍历会遇到已经分配好的纪念…… 题解列表 2024年11月14日 0 点赞 0 评论 577 浏览 评分:0.0