动态规划解决问题 #include#include#defineN100005#defineM25intv[M];intw[M];intdp[N];intmaximum(inta,intb){returna>=b?a:b;}intmain(){inti,m,n, 题解列表 2024年01月02日 0 点赞 0 评论 1051 浏览 评分:0.0
输出二进制(负数时数据有错的看这个) 解题思路:抛弃传统的短除法求二进制的策略,引入math库函数,运用减法求二进制,避免事后的倒序处理;同时,因为负数是采取补码运算的方式,所以为了简便过程,我们将符号位处理之后便可将数据化为对应的正数进行操作注意事项:网站的测试数据中应该没有涉及负数, 题解列表 2024年01月02日 0 点赞 0 评论 503 浏览 评分:0.0
注意细节就好 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int x; scanf("%d", &x); float r…… 题解列表 2024年01月01日 0 点赞 0 评论 803 浏览 评分:9.9
位数分解(不止于三位) 摘要:解题思路:不同于寻常方法的求解注意事项:该方法运用了函数递归参考代码:void print(int n){ if (n > 9) print(n / 10); printf("%d\n", n % …… 题解列表 2024年01月01日 0 点赞 0 评论 663 浏览 评分:0.0
简单易懂的答案 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void paixu(int array[]){ int i; int j; int k; for(i …… 题解列表 2023年12月31日 0 点赞 0 评论 397 浏览 评分:8.0
孤独的骑士 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i; scanf("%d",&n); getchar(); char ch; int a[100],…… 题解列表 2023年12月31日 0 点赞 0 评论 523 浏览 评分:9.9
编写题解 2792: 三角形判断,禁止抄答案,否则第2天被雷劈 摘要:解题思路:注意事项:禁止抄答案,否则第2天被雷劈参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double a,b,s…… 题解列表 2023年12月31日 0 点赞 0 评论 544 浏览 评分:6.0
题解 1002: [编程入门]三个数最大值 摘要:解题思路:注意事项:不要抄袭,会遭报应的.参考代码:#inciude <bits/stdc++.b>useing namespece std;int a,s,c;int mein()[ cin>…… 题解列表 2023年12月31日 0 点赞 1 评论 640 浏览 评分:9.9
编写题解 3009: 判断闰年123 摘要:解题思路:#include <bits/stdc++.h>using namespace std;int main(){ int y; cin>>y; if(y%4==0 && y%…… 题解列表 2023年12月31日 0 点赞 0 评论 574 浏览 评分:9.9
这道题想考察printf的点 摘要:解题思路:复制粘贴,然后在每行末尾加上\n\就OK了注意事项:printf格式控制串中若一行敲不完,行末加一个\然后换行继续敲就行了参考代码:#include<stdio.h> int main()…… 题解列表 2023年12月31日 5 点赞 0 评论 770 浏览 评分:10.0