题解列表

筛选

java解牛顿迭代法求平方根

解题思路:迭代参考代码:importjava.util.Scanner;publicclassMain{publicstaticvoidmain(String[]args){Scannerscanner=newScanner(System.in);inta=scanner.nextInt();doub

题解 1952: 求长方形周长和面积

摘要:解题思路:  注意事项: 注意换行符参考代码:#include<stdio.h>int main(){//定义边长,宽,周长,面积的变量(正整数int)    int length,width,AAs……

数组逆序重放

摘要:解题思路:用两个数组注意事项:首项的下标加尾项的下标等于n+1参考代码:#include<stdio.h>int main(){    int n; scanf("%d",&n); int a[n],……

2919: 奖学金

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct student{   int xh,zf,a,b,c;} s[1000……

2888: 图像模糊处理

```#includeusingnamespacestd;constintN=1000;doublea[N][N],b[N][N];intc[N][N];intmain(){intn,m;cin>>n>>m;for(inti=1;ia[i][j];b[i][j]=a[i][j];}}for(inti=

单词查找树(python)

摘要:解题思路:注意事项:参考代码:class TrieNode:    def __init__(self):        self.children = {}        self.is_end_o……

求后序遍历(python)

摘要:解题思路:注意事项:参考代码:def build_tree(preorder, inorder):    if not preorder or not inorder:        return N……

求后序遍历

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