题解列表

筛选

倒杨辉三角形 (C语言代码)

摘要:解题思路:1.先写出基本的杨辉三角的样式,存在数组当中。2.然后倒着输出,找到倒着输出的规律就好了。记得数字的占位符的宽度应该和一次输出的空格的长度相等。参考代码:#include<stdio.h> ……

众数问题 (C++代码)

摘要://解题思路: //STL map 的用法  //注意事项: //STL map 的用法 规范 //map就是红黑树的封装。 #include <cstdio> ……

Minesweeper (C语言代码)

摘要:解题思路:遍历所有格子.把有雷的格子周围的空格计数+1.代码:#include <stdio.h>#include <stdlib.h>void MinesInCorner(char **,int,i……

回文数字 (C++代码)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int is_right(int m,int n){ int a[6]={0}; int t=……

P1001 (C++代码)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;const int M=10000;int a[M]={……

众数问题 (C语言代码)

摘要:解题思路:1.看到有输入数量的,其实就好弄多了,直接数组然后加循环。2.从第一个数开始遍历整个数组,看有几个数,然后遍历第二个数,看有几个,和第一个数的个数比较,少了,第二个数肯定就不是众数,多了,第……