试图解释答案为什么是F E 摘要:解题思路:1.看题目要求,本题要求输出选项ABC,2.先判断选项所代表的数据类型,和a,b输出的数据类型,再看看题目所写的代码有没有强制类型转换,不过本题没有强制类型转换,所以可以不用考虑,3.判断题…… 题解列表 2024年10月19日 2 点赞 0 评论 666 浏览 评分:9.9
[蓝桥杯2022年第十三届决赛真题-最大数字] 贪心+dfs 摘要:# 咋还给我爆long long了啊这题 ```cpp #include #define ULL unsigned long long #define LL long long #def…… 题解列表 2024年10月19日 0 点赞 0 评论 540 浏览 评分:9.9
信息学奥赛一本通T1346-亲戚(relation) 并查集 此题有毒 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int MAXN = 20010;int father[MAXN];in…… 题解列表 2024年10月19日 0 点赞 0 评论 507 浏览 评分:9.9
信息学奥赛一本通T1347-格子游戏 并查集 摘要: #include using namespace std; const int N = 40010; int p[N]; int n,m; …… 题解列表 2024年10月19日 1 点赞 0 评论 288 浏览 评分:9.9
python7行解决 摘要:解题思路:注意事项:参考代码:a = [int(i) for i in input().split()]b = int(input())c = 0for i in a: if b + 30 >=…… 题解列表 2024年10月20日 1 点赞 0 评论 631 浏览 评分:9.9
红与黑C++代码(程序不用回溯) 摘要:注意事项: 这个程序不用回溯,回溯过于浪费时间。参考代码:#include<bits/stdc++.h>using namespace std;int w,h,maxx;bool boo…… 题解列表 2024年10月20日 0 点赞 0 评论 362 浏览 评分:9.9
阶乘求和(自定义函数法) 摘要:解题思路:因为最后结果是由很多个阶乘相加,所以我们可以自定义一个阶乘函数,然后再利用循环将多个阶乘相加首先,自定义阶乘函数#include<iostream>using namespace std;l…… 题解列表 2024年10月20日 1 点赞 0 评论 819 浏览 评分:9.9
菜鸡暴力解法,直接遍历出所有坐标 摘要:解题思路:遍历出需要挪树的具体坐标,再删除列表中重复的坐标,其值去减去其树的总数,就等于剩下的树注意事项:参考代码:# a表示这段路一共有多少棵树,b表示这段路一共有多少个区域a,b = map(in…… 题解列表 2024年10月20日 0 点赞 0 评论 452 浏览 评分:9.9
1025: [编程入门]数组插入处理 摘要:解题思路:从后往前比较数组中的数值与目标数值的大小,若目标数值小于数组中的数,则数组中的数值向后移动,直到目标值大于数组中的数值,此时对应的数组中正好有一个空位,将目标值放入。然后遍历数组。注意事项:…… 题解列表 2024年10月20日 0 点赞 4 评论 512 浏览 评分:9.9
优质题解 团伙(group) 并查集 摘要: #include using namespace std; int n,m; int o,p,q; int father[1001]; int…… 题解列表 2024年10月20日 173 点赞 0 评论 3633 浏览 评分:9.9