动态规划Java解题 摘要:解题思路:动态规划的简单应用注意事项:最好得拿张纸写写,再用断点去一点点领悟其运行过程参考代码:/* 关于动态规划的一道题目 一个美食家在一条街上从前往后吃,每一次吃的都要比上次的更加好 …… 题解列表 2023年02月10日 0 点赞 0 评论 678 浏览 评分:0.0
图的遍历-DFS ```cpp#includeusingnamespacestd;#definelllonglongintn;//节点数constintN=55;//最大节点数intmp[N][N]={};//邻接表boolvis[N]={};//标记intstep=0;//遍历步数voiddfs(intx){//x表 题解列表 2023年02月10日 0 点赞 0 评论 724 浏览 评分:0.0
计算(a+b)*c的值 (c++) 摘要:解题思路:先设置变量a,b,c,再输入变量,最后输出(a+b)*c的值注意事项:a+b要带括号参考代码:#include<iostream>//导入头文件using namespace std;int…… 题解列表 2023年02月10日 0 点赞 0 评论 652 浏览 评分:9.9
计负均正1061题解 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int num[20]; double count=0.0…… 题解列表 2023年02月10日 0 点赞 0 评论 439 浏览 评分:0.0
计算(a+b)/c的值 (c++) 摘要:解题思路:先定义整数a,b,c,用cout输出(a+b)/c的值,就可以提交代码了。参考代码:#include<iostream>//导入头文件using namespace std;int main…… 题解列表 2023年02月10日 0 点赞 0 评论 1038 浏览 评分:9.9
去掉空格(太折磨了,但这个代码大家都看得懂) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char str[100]; char ch; int i = 0,coun…… 题解列表 2023年02月10日 0 点赞 0 评论 534 浏览 评分:9.9
2772: 苹果和虫子(Python) 摘要:解题思路:注意事项:参考代码:from decimal import * Pi=3.14159 tmp = input() n,x,y = tmp.split() n = int(n) x …… 题解列表 2023年02月10日 0 点赞 0 评论 752 浏览 评分:2.0
1866: 三位数反转(Python) 摘要:解题思路:注意事项:参考代码:while True: try: n = input() m = n[::-1]   题解列表 2023年02月10日 0 点赞 2 评论 975 浏览 评分:7.3
编写题解 1117: K-进制数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long LL;LL n,k,res;LL fac(in…… 题解列表 2023年02月10日 0 点赞 0 评论 483 浏览 评分:9.9
编写题解 1025: [编程入门]数组插入处理 -- 冒泡排序原理 解题思路:运用冒泡排序的原理,将插入的数据,与排好顺序的数组,依次比大小。```c#includeintmain(void){inta[10];//插入数据后的数组长度。inti;intdex;//插入的数据。intj=8;//插入的数据dex与原来数组比较的次数。 题解列表 2023年02月10日 0 点赞 0 评论 470 浏览 评分:0.0