c++兰顿蚂蚁简单思路 摘要:```cpp #include #include using namespace std; const int N = 105; int g[N][N]; int n,m,x,y,k…… 题解列表 2023年02月08日 0 点赞 0 评论 365 浏览 评分:0.0
使用俩个for循环 摘要:解题思路:注意奇数是从1开始偶数从2开始注意事项:参考代码:#include<stdio.h>int main(){ int N,Sum1=0,Sum2=0; scanf("%d",&N)…… 题解列表 2023年02月08日 0 点赞 0 评论 341 浏览 评分:0.0
用for循环迭代求平方根!思路超简单! 摘要:解题思路:设定迭代初值为1,只要满足收敛的数都可。利用数组存储第一个元素为初值,再写出迭代公式,满足精度则跳出循环。注意事项:C语言的绝对值函数是fabs,一直记得是matlab的abs,导致一直没检…… 题解列表 2023年02月08日 0 点赞 0 评论 337 浏览 评分:0.0
合法的标识符 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i=0; int flag; char a[30]; gets(a);//接收字…… 题解列表 2023年02月08日 0 点赞 0 评论 601 浏览 评分:9.9
python DFS解法 摘要:v,w=map(int,input().split())pvw=[]for i in range(5): pvw.append([int(_) for _ in input().split()]…… 题解列表 2023年02月08日 0 点赞 0 评论 358 浏览 评分:0.0
数字三角形模型 摘要:## 数字三角形模型 ### 注意事项 1.注意边界问题,第一行和第一列只有一个方向能过来。 2.题目中说的(2N - 1)其实是限制了走的方向。 #### 代码 ``` #i…… 题解列表 2023年02月08日 0 点赞 0 评论 467 浏览 评分:0.0
数字三角形模型 摘要:# 数字三角形模型原题 ## 动态规划 1.二维状态表示,f[i][j]表示走到(i,j)(包括)时的最大路径权值。 2.状态转移可由f[i - 1][j - 1]和f[i][j - 1]得…… 题解列表 2023年02月08日 0 点赞 0 评论 468 浏览 评分:0.0
分段函数求值 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int x, y; scanf("%d", &x); if (x < 1) { y = x; …… 题解列表 2023年02月08日 0 点赞 0 评论 208 浏览 评分:0.0
2810: 鸡尾酒疗法 摘要:解题思路:注意事项:参考代码:l = [] n = int(input()) a,b = map(int,input().split()) x = b / a for i in range(0…… 题解列表 2023年02月08日 0 点赞 0 评论 467 浏览 评分:6.7
自定义函数之数字分离(so easy) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int num; scanf("%d", &num); int a = num / 1000; int b = …… 题解列表 2023年02月08日 0 点赞 0 评论 282 浏览 评分:0.0