C语言训练-求矩阵的两对角线上的元素之和 摘要:解题思路:1. 首先,导入<stdio.h>头文件,该头文件包含了输入输出函数scanf和printf的声明。2. 在main函数中,声明了一些变量: - i和j分别用于循环计数。 - n表示…… 题解列表 2023年11月09日 0 点赞 0 评论 954 浏览 评分:9.9
最后两个测试例 都比较坑,需要特判,附带样例 摘要:import pprint r,c=map(int,input().split()) b=[] for x in range(c): b.append(list(input())) …… 题解列表 2023年11月09日 0 点赞 0 评论 492 浏览 评分:0.0
矩阵对角求和 解题思路:1.首先,声明变量i、j、n、sum1和sum2,它们分别用于控制循环和保存对角线和的结果。2.通过scanf函数读取用户输入的n,该值表示二维数组的行和列的数量。3.创建一个大小为n×n的二维数组arr。4.使用嵌套的for循环, 题解列表 2023年11月09日 0 点赞 0 评论 679 浏览 评分:0.0
矩阵对角线求和(二维数组法) 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { int i=0,j=0; int arr[3][3]; for(i=0;i<3;i++)/…… 题解列表 2023年11月09日 0 点赞 0 评论 629 浏览 评分:0.0
[编程入门]链表合并(先用数组输入的数排好序,再传入链表,这样就是合并两个有序的链表,或者定义一个函数给链表节点排序) 摘要:解题思路:注意事项:参考代码:使用结构体数组先将输入的数排好序:#include<stdio.h> #include<malloc.h> #include<stdbool.h> struct N…… 题解列表 2023年11月09日 0 点赞 0 评论 510 浏览 评分:0.0
祝你好运laber 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b,c; cin>>a>>b>>c;…… 题解列表 2023年11月09日 0 点赞 0 评论 598 浏览 评分:9.9
c++萌新的题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ //intÊÇÕûÊý 1 2 9 69 100 …… 题解列表 2023年11月09日 0 点赞 0 评论 496 浏览 评分:9.9
使用vector()解题. 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>#include<vector>using namespace std;bool cmp(vector…… 题解列表 2023年11月09日 0 点赞 0 评论 533 浏览 评分:0.0
冒泡排序c++ 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[600];int main(){ int n=0; in…… 题解列表 2023年11月09日 0 点赞 2 评论 604 浏览 评分:9.9
冒泡排序c++ 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct student{ string name; doubl…… 题解列表 2023年11月09日 0 点赞 0 评论 896 浏览 评分:9.9