题解列表

筛选

题解 2773: 计算线段长度

摘要:C语言中 pow函数的声明:double pow(double x, double y) pow(x,y):x的y次幂 ```c #include #include int ma……

暴力搜索(小白勿喷)

摘要:解题思路: 暴力不用带脑子,知道临界条件后,其他的都交给计算机就行注意事项:参考代码:#include <stdio.h>int n[10010]={0};int count;int max=0,mi……

完全背包问题(C++)

摘要:解题思路:设dp[i][j]的含义是:在背包承重为j的前提下,从前i种物品中选能够得到的最大价值。 如何计算dp[i][j]呢?我们可以将它划分为以下若干部分: 选0个第i种物品:相当于不选第i种……

python2885: 矩阵转置

摘要:解题思路:注意事项:参考代码:n, m = map(int, input().split()) A = [] for _ in range(n):     A.append(list(map(i……

题解 1234: 检查一个数是否为质数

摘要:解题思路:循环+判断注意事项:注意事项:别抄我的,抄我的人我诅咒他电脑10秒关机参考代码:#include<bits/stdc++.h>using namespace std;int main(){s……