菜鸡暴力解法,直接遍历出所有坐标 摘要:解题思路:遍历出需要挪树的具体坐标,再删除列表中重复的坐标,其值去减去其树的总数,就等于剩下的树注意事项:参考代码:# a表示这段路一共有多少棵树,b表示这段路一共有多少个区域a,b = map(in…… 题解列表 2024年10月20日 0 点赞 0 评论 366 浏览 评分:9.9
1025: [编程入门]数组插入处理 摘要:解题思路:从后往前比较数组中的数值与目标数值的大小,若目标数值小于数组中的数,则数组中的数值向后移动,直到目标值大于数组中的数值,此时对应的数组中正好有一个空位,将目标值放入。然后遍历数组。注意事项:…… 题解列表 2024年10月20日 0 点赞 4 评论 413 浏览 评分:9.9
优质题解 团伙(group) 并查集 摘要: #include using namespace std; int n,m; int o,p,q; int father[1001]; int…… 题解列表 2024年10月20日 173 点赞 0 评论 2546 浏览 评分:9.9
逆天解法,包得吃的。 摘要:解题思路:一直交换,将后面的数换到前面。注意事项:参考代码:#include<stdio.h>int main(){ int a,i,j,b,c,arr[10]={0}; scanf("%d",&a)…… 题解列表 2024年10月20日 0 点赞 0 评论 814 浏览 评分:9.9
2820: 含k个3的数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i=0,x,y; scanf("%d %d",&x,&y); if(x%19==0) …… 题解列表 2024年10月20日 2 点赞 0 评论 312 浏览 评分:9.9
[金银岛]自定义排序优先'均权'最大--我看题解都太复杂辣 摘要:# 贪心 自定义排序找均权值最大 #### 好久没发题解了。。。 ##### 核心思路:通过价值/重量 得到单位价值 ###### 按照单位价值从大到小得顺序装 直到装不下为止 ##…… 题解列表 2024年10月20日 0 点赞 1 评论 350 浏览 评分:9.9
题可以贪心做,人要看准了爱. 摘要:# 权重 = 价值 / 重量 就是先拿(价值/重量)权重最大的, 最后拿不下了就分割(权重*剩下背包重量)拿走就行了 ```cpp #include #define ULL unsign…… 题解列表 2024年10月21日 0 点赞 2 评论 291 浏览 评分:9.9
2835: 计算书费 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ double arr[100],sum=0,brr[100]; brr[0]=28.9; br…… 题解列表 2024年10月21日 0 点赞 0 评论 326 浏览 评分:9.9
搭配购买(buy) 并查集+01背包dp问题 摘要: #include using namespace std; const int N = 1e4 + 5; int father[N]; int valu…… 题解列表 2024年10月21日 1 点赞 0 评论 193 浏览 评分:9.9
亲戚 并查集+人数求和 摘要: #include using namespace std; int n,m,a,b; char c; struct relation …… 题解列表 2024年10月21日 0 点赞 0 评论 186 浏览 评分:9.9