题解列表

筛选

C语言新手,见丑了

摘要:解题思路:最麻烦但思路易理解注意事项:参考代码:#include<stdio.h>int main(){    int a,b,c;    int t;    scanf("%d %d %d",&a,……

1097: 蛇行矩阵

摘要:>记录一下自己的写法 1.解题思路 样例输入 5 样例输出 1 3 6 10 15 2 5 9 14 4 8 13 7 12 11 首先我们先对数据进行分析,也就是寻找……

宏定义与自定义

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define arr_1(a,b,c)  ((a>b)?a:b)>c?((a>b)?a:b):cfloat max(float l,f……

三目运算符简化闰年

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define LEAP_YEAR(y) (y%4==0&&y%100!=0||y%400==0)?&#39;L&#39;:&#39;N……

宏定义三角简化

摘要:解题思路:宏定义函数求解注意事项:注意不要超出界限参考代码:#include<stdio.h>#include<math.h>#define a_1(a,b,c) (a+b+c)/2#define s……

彩票解题思路

摘要:解题思路:注意事项:参考代码:Scanner sc = new Scanner(System.in); int n = sc.nextInt(),cnt; int[] arr1 = new int……

宏定义与指针区别

摘要:解题思路:注意事项:参考代码:指针是访问 而宏定义是机械替换#include<stdio.h>#define swap(a,b){int temp;temp=a;a=b;b=temp}int main……

数列排序简单思路

摘要:解题思路:注意事项:参考代码:# include <iostream> using namespace std; int main() { int n; cin >> n; w……