循环控制--5.最高的分数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int n,max=0,a; scanf("%d",&n); for(int i=0;i<n…… 题解列表 2023年03月24日 0 点赞 0 评论 331 浏览 评分:8.7
无脑暴力搜索,因为数据范围很小 摘要:解题思路:直接深搜,每个结点最多两个子结点(要么加要么减,不可能既加又减),最多18层,所以最多有1+2+4+8+....+2^18=2^19-1<一百万个结点,这么小的数据范围,直接暴力搜索就行。D…… 题解列表 2023年03月31日 0 点赞 0 评论 686 浏览 评分:8.7
使用stl的双向链表+数组 摘要:```cpp #include using namespace std; #define pr pair #define ll long long const int N = 5e5 + 5…… 题解列表 2023年04月10日 0 点赞 0 评论 695 浏览 评分:8.7
1290: 奶牛的锻炼 摘要:```cpp #include #include using namespace std; const int N=10500,M=550; int dp[N][M],d[N],n,m; …… 题解列表 2023年04月15日 0 点赞 0 评论 494 浏览 评分:8.7
1953: 三位数分解(制作不易,给个好评吧) 摘要:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c,d; cin>>a; b=a/100; …… 题解列表 2023年04月29日 0 点赞 2 评论 217 浏览 评分:8.7
阶乘的和(AC) 摘要:解题思路:先明白一点,如果所有数都只出现一次,则m为min(Ai)。有(min(Ai)+1)个min(Ai)!,m才能变为min(Ai)+1,具体来说,有:3!+3!+3!+3!=4*3!==4!那思…… 题解列表 2023年06月07日 1 点赞 0 评论 1243 浏览 评分:8.7
//////////////最高的分数////////////// 摘要:解题思路:#include<bits/stdc++.h>int main(){ int n, arr[1000], max=0; scanf("%d", &n); for (int …… 题解列表 2023年07月11日 0 点赞 0 评论 401 浏览 评分:8.7
优质题解 2819: 数字反转(详细题解) 摘要:题目解析: 给定的代码是一个简单的整数反转程序,它使用了循环和取模运算符来实现数字的反转。解题思路:1. 首先定义一个变量 ans 并将其初始化为 0,用于存储反转后的数字。2. 通过循环遍历给定的…… 题解列表 2023年07月13日 1 点赞 0 评论 884 浏览 评分:8.7
2824: 求出e的值 摘要:参考代码:#include<bits/stdc++.h>using namespace std;int main(){int n;cin>>n;double s=0,t=1;for(int i=1;i…… 题解列表 2023年07月14日 0 点赞 1 评论 383 浏览 评分:8.7
优质题解 字符串排序(C++代码解析和题解) 摘要:代码解析:首先,定义了一个名为 compare 的函数,用于比较两个字符串的长度。函数返回值为 bool 类型,如果第一个字符串的长度小于第二个字符串的长度,则返回 true,否则返回 false。在…… 题解列表 2023年07月17日 0 点赞 0 评论 699 浏览 评分:8.7