[编程入门]结构体之成绩记录 摘要:解题思路:注意事项:参考代码:class Student(): def input(self, student_id, name, score): self.student…… 题解列表 2023年11月30日 1 点赞 0 评论 457 浏览 评分:0.0
《01背包问题》改版 #《01背包问题》改版**如果你不了解01背包问题,那就请到b站上先了解,你才有可能通过此题。**##价值(val[])、总容量(V)、每件容量(v[])、考虑此物时的价值(dp[])**这几个变量必须要了解!!!**##以下是利用了滚动一维数组的代码**主要是考虑了下一件物品后上一次的价值就没用了, 题解列表 2023年11月30日 0 点赞 0 评论 614 浏览 评分:9.9
矩阵交换行 摘要:解题思路:注意事项:参考代码:for i in range(5): ls = list(map(int, input().split())) a.append(ls)b = list(ma…… 题解列表 2023年11月30日 0 点赞 0 评论 725 浏览 评分:8.0
答案之中的答案 摘要:解题思路:wu注意事项:wu参考代码:#include <iostream>using namespace std;int main() { int N,sum = 0; cin >> N…… 题解列表 2023年11月30日 0 点赞 1 评论 447 浏览 评分:9.9
自定义函数之字符串连接 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void str_cat(char a[],char b[]){ strcat(a,b); …… 题解列表 2023年11月30日 0 点赞 0 评论 408 浏览 评分:0.0
自定义函数之字符串反转 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void dx_print(char a[],int n){ int i=0; for(i=n-1;i>=0;i--) …… 题解列表 2023年11月30日 0 点赞 0 评论 425 浏览 评分:0.0
2846: 统计数字字符个数 摘要:解题思路:这道题涉及了字符串,我们就需要头文件<string.h>,按照题目要求,输入字符会包含空格,所以我们输入不再使用scanf,而是使用gets()。注意事项:在遍历数组中的字符串是,我们要明白…… 题解列表 2023年11月30日 0 点赞 0 评论 957 浏览 评分:6.0
]字符串分类统计 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char a[200]; gets(a); int i,zimu=0,shuzi=0,kong…… 题解列表 2023年11月30日 0 点赞 0 评论 426 浏览 评分:0.0
2937 短信收费 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,m,t=0; int a[1005]; int b[1005]; scanf("%d",&n); f…… 题解列表 2023年11月30日 0 点赞 0 评论 566 浏览 评分:0.0
求平方差个数(超时可参考) 摘要:`解题方法:多列几组关于平方的等式,然后观察规律 ` `例如: 1=1²-0² 5=3²-2² 2 6 3=2²-1² 7=…… 题解列表 2023年11月30日 0 点赞 0 评论 723 浏览 评分:2.0