题解列表

筛选

2048: 多重背包一眼丁真

摘要:解题思路:        在01背包的基础上再套多一层循环以表示该物品的个数注意事项:参考代码:#include<stdio.h> #define max(x,y) ((x)>(y)?(x):(y)……

无虑,无悔,无题。

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m; scanf("%d",&m); switch (m){ case 1 : case 2 :prin……

普普通通的解题方法

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){int a,b,c;scanf("%d%d%d",&a,&b,&c);if(a*a+b*b==c*c||b*b+c……

利用math中的求余

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>double a, b, r;int main() { scanf("%lf%lf", &a, &b……

1116: IP判断 java基础语法

摘要:import java.util.Scanner; public class Main {     public static boolean ipValid(String ip) {   ……

2038: 简化型背包,暴力搜索

摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义全局变量v, m和h,并初始化h为-1 int v,m,h=-1……

最简单易懂的解法

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <ctype.h>#include <string.h>int main(){    char a[80];    ……

1915无题.。。。

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>int main (){ int a[666],b;  for (int i = 0;i < 3;i++……

良心出品,放心食用

摘要:解题思路:这段代码定义了一个数组  A  ,并通过循环计算出  N  在一定范围内(小于 55)时对应的某种数量值  A[N - 1]  ,然后根据输入的  N  值输出相应的结果。在代码中,首先初始……