• 2024-11-20元素和小于k的子矩阵数目
    https://leetcode.cn/problems/count-submatrices-with-top-left-element-and-sum-less-than-k/description/intcountSubmatrices(int**grid,intgridSize,int*gridColSize,intk){intx=gridSize,y=*gridColSize;inta[x][y];memset(a,0,sizeof(a));intcount=
  • 2023-11-18Unity实现Voronoi图(性能友好,分布较为均匀
     这是一种性能友好的并且生成较为均匀的Voronoi图的实现方式  在一张网格中生成随机点,然后在取每个点周围点就不需要去做全局遍历,在自己周围的格子遍历即可usingUnityEngine;usingUnityEngine.UI;publicclassVoronoiDiagram:MonoBehaviour{publicintg
  • 2023-11-08Unity 格子工具
     usingUnityEditor;usingUnityEngine;publicclassCustomGridWindow3:EditorWindow{privateTexture2DcustomBackgroundTexture;privateVector2gridSize=newVector2(10,10);privateColor[]cellColors;privateboolisSelecting=fal
  • 2023-07-20canvas绘画格子
    <!DOCTYPEhtml><html><head> <style>  canvas{   border:1pxsolid#ccc;  } </style> <script>  letcanvas;  letctx;    //自定义格子数据,包含内容和颜色  constgridData=[   {content:"这是第一行文
  • 2023-06-30贪吃蛇小游戏
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title></head><body><h1>画布canvas</h1><canvasid="gameCanvas"width="600"
  • 2023-06-30简单的贪吃蛇小游戏
    <!DOCTYPEhtml><htmllang="en"><head><metacharset="UTF-8"><title>Title</title></head><body><h1>画布canvas</h1><canvasid="gameCanvas"width="600"
  • 2023-06-30贪吃蛇制作js
    <!DOCTYPEhtml><html><head><title>贪吃蛇游戏</title><style>#game-board{width:400px;height:400px;border:1pxsolid#000;position:relative;}.snake{width:20px;height:20
  • 2023-06-13贪吃蛇小程序
    <!DOCTYPEhtml><htmllang="en"><head>  <metacharset="UTF-8">  <title>Title</title></head><body><h1>画布canvas</h1><canvasid="gameCanvas"width="6
  • 2023-03-09ModelInstanceCollection 加载大量模型
    functiongetInstances(){varinstances=[];vargridSize=Math.sqrt(10000);varcLon=data.longitude;varcLat=data.latitude;var
  • 2023-02-19简单的python格网算法算数据密集度demo
    #格网算法计算数据集区域数据密集度importtimeimportrandomimportnumpyasnpimportpandasaspd#模拟数据集defcreate_data():data_x=[]data_y