蓝桥杯2023b组c++省赛
时间: 2023-09-13 10:06:48 浏览: 103
蓝桥杯2023年B组C++省赛的题目包括了2个填空题和8个编程题。根据参赛者的博客\[1\],本届蓝桥杯的难度相较于上届有所增加,编程题的难度较大,而思维题的数量较少。参赛者在博客中提到了其中一个题目,即试题A:日期统计\[2\]。在博客中还提到了一种解题方法,即暴力枚举\[3\]。暴力枚举的代码如下:
```cpp
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
const int total = 23333333;
const double H = 11625907.5798;
int main() {
for (int i = 0; i < total / 2; i++) {
double ans = 0;
ans -= 1.0 * i * i / total * log2(1.0 * i / total);
ans -= 1.0 * (total - i) * (total - i) / total * log2(1.0 * (total - i) / total);
if (abs(ans - H) < 1e-4) {
cout << i << endl;
return 0;
}
}
return 0;
}
```
以上是关于蓝桥杯2023年B组C++省赛的一些信息。希望对你有所帮助!
#### 引用[.reference_title]
- *1* *3* [2023年第十四届蓝桥杯C++B组复盘](https://blog.csdn.net/m0_46326495/article/details/130043563)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* [2023第十四届蓝桥杯C++B组题目回顾与参赛感想](https://blog.csdn.net/BinBinCome/article/details/130048888)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)