题解列表

筛选

宏定义的练习

摘要:解题思路:注意事项:注意要求是a/b的余数  余数参考代码:#include<stdio.h> #define yushu (a%b) int main() {     int a,b,c; ……

带参数宏定义练习

解题思路:用宏定义来交换a,b的值,宏定义#defineSWAP(a,b){a=a+b;b=a-b;a=a-b;}以此来交换a,b的值,在程序中,用swap来调用注意事项:参考代码:#include#defineSWAP(a,

2883: 矩阵加法

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int n,m,a[100][100],b[100][100];int main(……

计算矩阵边缘元素之和

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int a[100][100];int main(){    int n,m,su……

C语言解组合的输出

摘要:解题思路:注意事项:注意输出格式参考代码:#include <stdio.h>#include <stdbool.h>int n,r;bool judge[25];int b[25];void arr……

C++题解 1796: 蛇形填数

摘要:参考代码:首先定义数组 输入格数#include  <bits/stdc++.h> using namespace std; int a[1100][1100]; int main() { ……