蓝桥杯2024年第十五届决赛真题-数位翻转 摘要:解题思路:这道题目可以用动态规划来解决,主要步骤如下:1.定义状态:dp[i][j][0] 表示前 i 个数中恰好选择 j 个区间,且第 i 个数没有翻转时的最大和。dp[i][j][1] 表示前 i…… 题解列表 2024年07月03日 4 点赞 0 评论 1509 浏览 评分:5.7
吐槽这道题!在写交换函数时,先写交换小的是错的?! 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;void in(int a[]){for(int i=0;i…… 题解列表 2024年07月02日 0 点赞 0 评论 361 浏览 评分:9.9
计算每条线段经过的整数点并用map判断 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> using namespace std; typedef pair<int,int> PI; map<PI,int>…… 题解列表 2024年06月30日 17 点赞 0 评论 3514 浏览 评分:7.3
编写题解 2777: 计算2的幂 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,sum=1;cin>>n; for…… 题解列表 2024年06月30日 0 点赞 0 评论 582 浏览 评分:9.9
编写题解 2805: 乘方计算 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a,n,sum=1;cin>>a>>n; …… 题解列表 2024年06月30日 1 点赞 0 评论 502 浏览 评分:9.0
2777:计算2的幂 摘要:解题思路:循环注意事项:变量参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int i,n,sum; sum=1;…… 题解列表 2024年06月30日 0 点赞 0 评论 319 浏览 评分:0.0
2805: 乘方计算 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,n,sum=1; cin>>a>>n…… 题解列表 2024年06月30日 0 点赞 0 评论 290 浏览 评分:0.0
ddddgggggggggggggggggggggggggggcb 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int k,sum1=0 ,sum5=0,sum10=…… 题解列表 2024年06月30日 0 点赞 0 评论 316 浏览 评分:0.0
编写题解 2803: 整数的个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int k,sum1=0,sum5=0,sum10=…… 题解列表 2024年06月30日 0 点赞 0 评论 501 浏览 评分:9.9
2803: 整数的个数 摘要:解题思路:注意事项:别忘给sum赋值参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int k,sum1=0,sum5=0…… 题解列表 2024年06月30日 0 点赞 0 评论 266 浏览 评分:0.0