题解列表

筛选

输出全排列(详细注释)

摘要:这段代码是一个实现全排列的程序。它使用了递归的思想,通过不断交换数组中的元素来生成所有可能的排列。具体的实现过程如下:首先定义了两个辅助函数swap和swapback,用于交换数组中的元素。swap函……

使用滑动窗口来解决

摘要:解题思路:注意事项:参考代码:n = int(input()) a = input().split() s = [] ans = 0  # 初始化收集的雪花数量 l, r = 0, 0  # ……

整数奇偶排序(c语言)

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int swap(int* a,int* b){     int temp=*a;     *a=*b;     *b=temp;}i……

2772: 苹果和虫子

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

2774: 计算三角形面积

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    double x1,y1,x2,y2,x3,y3,a……

编写题解 2997: 梯形面积

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    double e;    e=150*2/15*(15……