题解列表

筛选

2939: 最匹配的矩阵(超详解)

```c#include#include#include#include//计算矩阵A的子矩阵与矩阵B的差值绝对和intcalculate_diff(int**A,int**B,intr,ints,introw,intcol){intsum=0;for(inti=0;i

以自己理解写的,比较简单

摘要:解题思路:注意事项:尽量在b[y][x] = a[y][x]时把a[x][y]改掉参考代码:#include<stdio.h>int main(){     int x, y;     int a[3……

校门外的树

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

车厢调度(python)

摘要:解题思路:注意事项:参考代码:def trainSchedule(n, order):    stack = []    next_car = 1        for car in order:  ……

合并果子(python)

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

二叉树遍历(python)

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