题解列表

筛选

众数问题 (C语言代码)

摘要:解题思路:记录每一个数字的出现次数并比较注意事项:参考代码:#include <stdio.h>int main(void){ int i, j, n, count, min, digit, coun……

回文数(一) (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main(void){ int i, j, l, k, m, x, y, z, h, gao……

检查金币 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main(void){ int num[10]; int i, j, k, l, q, w,……

马拦过河卒 (C语言代码)

摘要:解题思路:用递归遍历每一种情况,并且根据马的位置去掉不能走过的点注意事项:参考代码:#include <stdio.h>int computer(int x1, int y1, int x, int ……

剔除相关数 (C语言代码)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>typedef struct Node{ int pre; int change; int flag……
优质题解

Manchester-求矩阵的两对角线上的元素之和(一维数组代替二维数组)

解题思路:1.用一维数组代替二维数组;2.设Length为二维数组中每行的长度;3.对应一维数组长度为pow(Length,2);4.设i代表行数,从1开始;(也可以从0开始,但下面关系式要变)5.则主对角线上的元素对应在一维数组中的下标与i的关系为:(i-1)*Length+i-1------->(