题解列表

筛选

C语言最简单易懂的01背包解法

摘要:解题思路:注意事项:参考代码:// DP动态规划  01背包#include<stdio.h>int main(){    int N, m, v[25], p[25], dp[30000] = { ……

编写题解 2779: 输出绝对值,python超简单

摘要:解题思路:输入,注意是浮点数输出浮点数并保留两位小数注意事项:abs(N)计算浮点数N的绝对值。float(input())将用户输入的字符串转换为浮点数&#39;%.2f&#39; % abs(N)……

LETTERS(经典DFS)

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cstdio> using namespace std; int r, s,t1=0,t2;//r,s表示迷……

循环输入简单易懂

摘要:#include int main() { int n,i; int a; int sum; while(1)//进入循环,结束条件为当输入的数等于0的时候……

数据结构-集合union(基础)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;typedef struct List{    int L[200];    int leng……

~~求亲和数~~

摘要: #include int main() { int m; scanf("%d",&m); while(m--)//循环……