题解列表

筛选

数1的个数(C++代码)

摘要:参考代码:#include<iostream>using namespace std;int countOnes(int n) {    int count = 0;    for (int i = ……

2831: 画矩形

摘要:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    int a,b,d;    char c;    cin>>a>>b>>c……

aaaaaaaaaaaaaaaaaaaaaaaaaaaaa

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){int n;cin>>n;double s=0,t=1;for……

单词翻转(C++代码解析)

摘要:代码解析:首先,引入了必要的头文件,包括iostream、string和sstream。这些头文件分别用于输入输出操作、字符串处理和字符串流处理。接下来,定义了一个reverseWord函数,它接受一……
优质题解

图像旋转(C++代码解析和题解)

摘要:代码解析:在 main 函数中,首先读取两个整数 n 和 m,分别表示图像矩阵的行数和列数。然后,创建了一个大小为100 * 100的二维数组 image,用于存储输入的图像矩阵。接下来,我们使用两个……

1099: 校门外的树

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int l,m,tree[1000000],s,e,sum=0,a=0;int main()……

**图像旋转**

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

走迷宫(bfs)

摘要:解题思路:很基础的bfs 没什么好说的 看代码即可注意事项:参考代码:#include<iostream> #include<queue> using namespace std; typede……

简化宏定义求三角形面积

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)/2#define area(a,b,c)  sqrt(……