简单DP,注意边界 # 2577: 蓝桥杯2020年第十一届省赛真题-走方格(C++) 摘要:``` #define _CRT_SECURE_NO_WARNINGS 1 #include #include #include #include #include #include …… 题解列表 2024年11月22日 0 点赞 0 评论 210 浏览 评分:9.9
关于 混合背包(完全背包、多重背包、01背包) 的解题思路(C语言) 摘要:注意:观看本篇文章需要一定基础,如果你不会解决背包问题,这里建议先去学习一下。解题思路:与多重背包差不多,不过要加入一个判断:当物品数量为0时,使用完全背包;如果不为0,则使用多重背包(当物品数量为1…… 题解列表 2024年11月22日 0 点赞 0 评论 312 浏览 评分:9.9
一种一懂的另类写法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include <math.h>int main(){ int n,t; scanf("%d",&n); double d = sqr…… 题解列表 2024年11月22日 0 点赞 0 评论 285 浏览 评分:9.9
题解 1231: 菜鸟解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,j,n,a[30][30]; while(scanf("%d",&n)==1){ …… 题解列表 2024年11月23日 0 点赞 0 评论 327 浏览 评分:9.9
编写题解 2330: 信息学奥赛一本通T1178-成绩排序(Python) 摘要:解题思路:利用sorted()函数进行排序注意事项:首先按成绩排序,如果成绩相同则按名字升序参考代码:n = int(input())sc_dict = {}for i in range(n): …… 题解列表 2024年11月23日 0 点赞 0 评论 381 浏览 评分:9.9
3031: 分解因数 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <stdlib.h> #include <stdbool.h> #include <stdio.h> #…… 题解列表 2024年11月23日 0 点赞 0 评论 757 浏览 评分:9.9
[编程入门]自定义函数处理素数-题解(Java代码) 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {…… 题解列表 2024年11月24日 0 点赞 0 评论 267 浏览 评分:9.9
2749: Hello, World! 摘要:解题思路:注意事项:参考代码:#include<iosteam> using namespace std; int main() …… 题解列表 2024年11月24日 2 点赞 0 评论 790 浏览 评分:9.9
编写题解 1141: C语言训练-百钱百鸡问题 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>int main() {printf("cock=0,hen=25,chicken=75\ncock=4,hen=18,c…… 题解列表 2024年11月24日 2 点赞 1 评论 334 浏览 评分:9.9
编写题解 3008: 买笔 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ long long x; cin>>x; if(x…… 题解列表 2024年11月24日 1 点赞 2 评论 220 浏览 评分:9.9