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