2835: 计算书费 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ double arr[100],sum=0,brr[100]; brr[0]=28.9; br…… 题解列表 2024年10月21日 0 点赞 0 评论 654 浏览 评分:9.9
1177: 三角形 摘要:解题思路:注意事项:参考代码:t = int(input())for x in range(t): n = int(input()) l = [] l = [ list(map(in…… 题解列表 2024年10月21日 1 点赞 0 评论 496 浏览 评分:0.0
题可以贪心做,人要看准了爱. #权重=价值/重量就是先拿(价值/重量)权重最大的,最后拿不下了就分割(权重*剩下背包重量)拿走就行了```cpp#include#defineULLunsignedlonglong#defineintlonglong#defineendl'\n'#definedebug(a)coutc[i].v;c 题解列表 2024年10月21日 0 点赞 2 评论 619 浏览 评分:9.9
[金银岛]自定义排序优先'均权'最大--我看题解都太复杂辣 #贪心自定义排序找均权值最大####好久没发题解了。。。#####核心思路:通过价值/重量得到单位价值######按照单位价值从大到小得顺序装直到装不下为止#####**金属可切割######若装不下整个金属那么就能装多少装多少按照价值/重量*能装下得重量######ACCode:```cpp#inc 题解列表 2024年10月20日 0 点赞 1 评论 673 浏览 评分: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 评论 664 浏览 评分:9.9
逆天解法,包得吃的。 摘要:解题思路:一直交换,将后面的数换到前面。注意事项:参考代码:#include<stdio.h>int main(){ int a,i,j,b,c,arr[10]={0}; scanf("%d",&a)…… 题解列表 2024年10月20日 0 点赞 0 评论 2264 浏览 评分:9.9
优质题解 团伙(group) 并查集 #includeusingnamespacestd;intn,m;into,p,q;intfather[1001];inte[1001];intres=0;intfind(intx){if(father[x]!=x){x=find(father[x]);}returnfather[x];}voidin 题解列表 2024年10月20日 174 点赞 0 评论 8283 浏览 评分:9.9
2878: 计算矩阵边缘元素之和 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N=2e3;ll a…… 题解列表 2024年10月20日 0 点赞 0 评论 2229 浏览 评分:0.0
2881: 图像相似度 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N=2e3;ll a…… 题解列表 2024年10月20日 2 点赞 0 评论 642 浏览 评分:0.0
快速幂方法(需掌握) 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long int fastPow(int a,int n,i…… 题解列表 2024年10月20日 1 点赞 0 评论 652 浏览 评分:0.0