题解列表

筛选

求后序遍历

摘要:解题思路:注意事项:参考代码:# 定义树节点的数据结构class TreeNode:    def __init__(self, val):        self.val = val        ……

合并果子(python)

摘要:解题思路:注意事项:参考代码:import heapqdef mergeFruits(fruits):    heap = []    for fruit in fruits:        heap……

校门外的树

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>void sortTwoArray(int* pArrayA,int*pArrayB,int tot……

题解 2945: 素数对

摘要:```c #include #include // 函数用于检查一个数是否是素数 int is_prime(int num) { if (num ……

编写题解 3007: 收费

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

2780: 奇偶数判断

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