题解列表

筛选

【蓝桥杯】分巧克力--二分查找

摘要:解题思路:注意事项:参考代码://分巧克力问题--标准的二分模板题 //判断条件以及二分上下界  #include <bits/stdc++.h> using namespace std; c……

【贪心思想】巧克力

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h> #define int long long using namespace std; const int N = 1……

矩阵交换行c++题解

摘要:解题思路:按吧按吧按吧按吧按吧按吧按吧按吧按吧注意事项:啥也没有参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a[6]……

dfs+贪心解法

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int n,k;int dfs(int t){    if(t<=n)    {       ……

数组切分 动态规划

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=1e5+10;in……

判断一个数是否是质数(C++)

摘要:解题思路:注意事项:0和1不是质数参考代码:#include<iostream>using namespace std;bool check(int n)//检查这个数是否是质数,{     if (……

闲来无事写个题解

摘要:解题思路:使用“cout”,输出一个字符串.注意事项:注意不要落下标点哦参考代码: #include<iosteam>                using namespace std;     ……

蓝桥杯卡牌c++二分答案解法

摘要:# 二分答案 ## 首先按照现有的卡牌数量a排序 ## 每轮检查m是否能够将所有卡牌都改成mid个 ### check函数就是简单的遍历每一个 ### 直到当前这一个卡牌数量达到了mid 或……