C++ 状态压缩dp 摘要:解题思路:尝试了一下dfs只能拿到一半的分数,刚好昨天学了状压dp,每一包糖果的组合都可以用一种状态来表示。可以枚举每一种状态通过状态转移方程得到结果注意事项:参考代码:#include<bits/s…… 题解列表 2024年04月05日 0 点赞 0 评论 270 浏览 评分:0.0
c++递增三元组 排序+二分 摘要:解题思路:将 ai<bj<ck 拆成两个式子 bj>ai 和 bj<ck; 所以只需要枚举j即可再用二分找出边界注意事项:参考代码:#include<bits/stdc++.h>#define int…… 题解列表 2024年04月06日 0 点赞 0 评论 222 浏览 评分:0.0
编写题解 1019: [编程入门]自由下落的距离计算 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ double sum,h,M,N; scanf("%lf %lf",&M,&N); h…… 题解列表 2024年04月06日 0 点赞 0 评论 127 浏览 评分:0.0
数位排序 c++ 摘要:#include using namespace std; int n,m; const int N=1e6; vectorpi; int han(int x) { int sum=…… 题解列表 2024年04月06日 0 点赞 0 评论 257 浏览 评分:0.0
六行简便 编写题解 2835: 计算书费 摘要:解题思路:a=list(map(int,input().split()))注意事项:s=s+a[i]*b[i]参考代码:a=list(map(int,input().split()))b=[28.9,…… 题解列表 2024年04月06日 0 点赞 0 评论 227 浏览 评分:0.0
题解 2835: 计算书费 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;double a[10]={28.9,32.7,45.6,78,35,86.2,2…… 题解列表 2024年04月06日 0 点赞 0 评论 132 浏览 评分:0.0
等差数列求和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i; int sum = 0; int j = 2; scanf("%d",…… 题解列表 2024年04月06日 0 点赞 0 评论 130 浏览 评分:0.0
求和训练,注意数据类型 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a, b, c; int sum1 = 0, sum2 = 0; float sum3…… 题解列表 2024年04月06日 0 点赞 0 评论 133 浏览 评分:0.0
蓝桥杯2013年第四届真题-剪格子(Java) 摘要:#### 拿的dfs代码改了一下,也是莫名其妙就过了,麻烦看看有啥子问题 ```java import java.util.Arrays; import java.util.Scanner;…… 题解列表 2024年04月06日 0 点赞 0 评论 223 浏览 评分:0.0
题解 2836: 数组逆序重放 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; int a…… 题解列表 2024年04月06日 0 点赞 0 评论 151 浏览 评分:0.0