#C++1153——简单穷举法 摘要:****************************************************************************************************…… 题解列表 2022年07月11日 0 点赞 0 评论 406 浏览 评分:9.9
C++语言训练-谁家孩子跑最慢(Vector,集合) 摘要:解题思路:建立两个vector<set<int>> 分别代表李、王家选手得分, 按照题目要求初始化李、王家可能的得分集合。 计算每一种可能的交集, 如果为空集, 则判断1分是否在李 、 王家, 否则就…… 题解列表 2024年08月13日 0 点赞 0 评论 208 浏览 评分:9.9
C语言训练-谁家孩子跑最慢* -题解(C++代码) 摘要:# 思路 穷举。 可以做一些优化。例如写成下面这样, for (int x = 1; x < 10; x++) for (int y = x + 2; y < 10; y++) for (i…… 题解列表 2020年01月01日 0 点赞 0 评论 653 浏览 评分:8.7
谁家孩子跑最慢*(数学很好做,直接输出结果) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ cout<<'W'; return 0;}…… 题解列表 2022年10月28日 0 点赞 2 评论 259 浏览 评分:7.3
代码不长,for比较多,新手易懂 摘要:解题思路:将名次等价于分数,每家15分,9、8已经固定,7个数分为2、2、3组然后遍历注意事项:如下参考代码:#include<iostream>using namespace std; int…… 题解列表 2022年04月03日 0 点赞 0 评论 464 浏览 评分:7.0
1153: C语言训练-谁家孩子跑最慢* 摘要:方法一: ```cpp #include #include using namespace std; int main() { int s[7]={1,2,3,4,5,6,7};…… 题解列表 2022年10月23日 0 点赞 0 评论 249 浏览 评分:6.0
C语言训练-谁家孩子跑最慢* (C++代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <cstdlib> #include <iostream> #include <cmath> #inclu…… 题解列表 2018年11月11日 2 点赞 0 评论 621 浏览 评分:5.3
C语言训练-谁家孩子跑最慢* (C++代码) 摘要:解题思路:本题使用C++中STL的全排列函数next_permutation()可以比较简单解决。由于得分1-9都是不重复的,所以1加到9一总共45分,根据题意“比赛结果各家的总分相同”则可得到每家得…… 题解列表 2018年09月24日 1 点赞 0 评论 931 浏览 评分:2.0
C语言训练-谁家孩子跑最慢* (C++代码) 摘要:解题思路: 暴力求解注意事项:参考代码:#include <iostream>#include <bits/stdc++.h>using namespace std;int main(){ co…… 题解列表 2019年04月24日 0 点赞 0 评论 391 浏览 评分:2.0
C语言训练-谁家孩子跑最慢* (C++代码) 摘要:解题思路:C++全排列函数next_permutation1-9都是不重复的,总共45分,每家分得15分,保证第一名在李家,第二名在王家,所以就有了第一个 if 语句了。为了不打乱顺序,定义另一个数组…… 题解列表 2018年09月22日 0 点赞 0 评论 726 浏览 评分:0.0