本文分类:news发布日期:2025/2/25 19:44:56
相关文章
代码随想录Day53|102.沉没孤岛 、103.水流问题 、104.建造最大岛屿
102.沉没孤岛 import java.util.*;class Main{public static int[][] dir {{0,1},{1,0},{0,-1},{-1,0}};public static void main (String[] args) {Scanner sc new Scanner(System.in);int n sc.nextInt();int m sc.nextInt();int[][] grid new int[n][m];for(int i 0…
建站知识
2025/2/19 1:08:58
【POJ-1061 青蛙的约会】
题目 代码
#include <bits/stdc.h>
using namespace std;
typedef long long LL;
LL ex_gcd(LL a, LL b, LL &x, LL &y)
{if (b 0){x 1;y 0;return a;}LL gcd ex_gcd(b, a % b, x, y);LL tmp x;x y;y tmp - a / b * y;return gcd;
}
int main()
{LL x, y…
建站知识
2025/2/25 19:13:05
vue3自动暴露element-plus组件的ref
自动暴露子组件的方法,注意在TS下,需要自己声明类型,我这里全用any代替了 <template><el-button click"getFocus">获得焦点</el-button><com ref"comRef" />
</template><script setup…
建站知识
2025/2/24 3:08:33
ESP32-定时器中断
前言
一、关于ESP32定时器常用的代码
1.#include
2.#include
3.#include 4.总结
二、可以使用的代码
1.代码
2.代码介绍
总结 前言 环境:Arduino
芯片:ESP32-WROOM-DA Module
更新时间:2024-09-25 一、关于ESP32定时器常用的代码
资料网上…
建站知识
2025/2/25 4:34:24
Golang | Leetcode Golang题解之第433题最小基因变化
题目: 题解:
func diffOne(s, t string) (diff bool) {for i : range s {if s[i] ! t[i] {if diff {return false}diff true}}return
}func minMutation(start, end string, bank []string) int {if start end {return 0}m : len(bank)adj : make([][…
建站知识
2025/2/22 22:15:45
Unity-物理系统-刚体加力
一 刚体自带添加力的方法 给刚体加力的目标就是 让其有一个速度 朝向某一个方向移动 1.首先应该获取刚体组件 rigidBody this.GetComponent<Rigidbody>(); 2.添加力 //相对世界坐标 //世界坐标系 Z轴正方向加了一个里 //加力过后 对象是否停止…
建站知识
2025/2/9 15:15:42