2068: [STL训练]Ignatius and the Princess IV (C++) 摘要:解题思路: 读入,排序,最中间的数即为所求注意事项: 无参考代码:#include <iostream> // #include <sstream> // #include <cstdio> #…… 题解列表 2023年02月07日 0 点赞 0 评论 249 浏览 评分:0.0
3000: 交换值 摘要:解题思路:注意事项:参考代码:a,b = map(int,input().split())c = a ; a = b ; b = cprint(a,b)…… 题解列表 2023年02月07日 0 点赞 0 评论 383 浏览 评分:0.0
C语言训练:阿姆斯特朗数 格式错误:一个空格就好了 摘要:解题思路:注意事项:参考代码:#include#includeint main(){int n,a,b,c;for(int i=2;i<1000;i++){ int j=i; while(…… 题解列表 2023年02月08日 0 点赞 0 评论 165 浏览 评分:0.0
鸡兔同笼Python解题 摘要:解题思路:注意事项:注意取值范围参考代码:n,m=map(int,input().split())for i in range(n+1): if i*2+(n-i)*4==m: p…… 题解列表 2023年02月08日 0 点赞 0 评论 324 浏览 评分:0.0
1052: [编程入门]链表合并题解 摘要:解题思路:参考了最赞,不过大部分按照自己理解重新写了答案1、新建链表节点结构体;2、定义创建链表函数;3、定义合并链表函数;4、定义链表按学号升序函数;5、定义输出链表数据函数;6、主函数:输入两张链…… 题解列表 2023年02月08日 0 点赞 0 评论 243 浏览 评分:0.0
pyhton选择排序解法 带注释 摘要:n=int(input().strip())X=list(map(int,input().split()))# print(X)for i in range(n): k=i #记录最小的值的下标…… 题解列表 2023年02月08日 0 点赞 0 评论 319 浏览 评分:0.0
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 评论 337 浏览 评分:0.0
使用俩个for循环 摘要:解题思路:注意奇数是从1开始偶数从2开始注意事项:参考代码:#include<stdio.h>int main(){ int N,Sum1=0,Sum2=0; scanf("%d",&N)…… 题解列表 2023年02月08日 0 点赞 0 评论 324 浏览 评分:0.0
用for循环迭代求平方根!思路超简单! 摘要:解题思路:设定迭代初值为1,只要满足收敛的数都可。利用数组存储第一个元素为初值,再写出迭代公式,满足精度则跳出循环。注意事项:C语言的绝对值函数是fabs,一直记得是matlab的abs,导致一直没检…… 题解列表 2023年02月08日 0 点赞 0 评论 304 浏览 评分:0.0
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 评论 331 浏览 评分:0.0