- 博客(39)
- 资源 (3)
- 收藏
- 关注
原创 LabView的简单例题,尽量做到一题多解
LabView的简单例题从四处找题做,并将一些经典题收集起来,尽量做到一题多解如果有更加绝妙的解法或者我的解法有错误欢迎在评论区中指出
2021-12-11 16:23:54 13186 1
原创 解析吃豆人游戏
【人工智能导论】解析吃豆人游戏Q1: Reflex AgentQ2: MinimaxQ3: Alpha-Beta PruningQ4: Evaluation Function
2021-05-22 17:18:01 13870 7
原创 Closest Pair of Points Problem(最近点对问题)
Closest Pair of Points Problem(最近点对问题)
2021-04-05 20:00:58 2624
转载 x & -x 的含义
x & (-x) 的含义最近复习树状数组时,发现看不懂自己笔记记得 x & (-x) ........上网查了下,发现这一篇讲解的很详细
2021-03-24 10:29:27 15870
原创 LeetCode206 反转链表
LeetCode206. 反转链表https://leetcode-cn.com/problems/reverse-linked-list/题目描述反转一个单链表。示例:输入: 1->2->3->4->5->NULL输出: 5->4->3->2->1->NULL进阶:你可以迭代或递归地反转链表。你能否用两种方法解决这道题?思路①双指针迭代 申请两个指针pre(最初指向NULL),cu
2021-02-02 20:42:12 76
原创 LeetCode84 柱状图中最大的矩形
LeetCode84. 柱状图中最大的矩形给定 n 个非负整数,用来表示柱状图中各个柱子的高度。每个柱子彼此相邻,且宽度为 1求在该柱状图中,能够勾勒出来的矩形的最大面积。以上是柱状图的示例,其中每个柱子的宽度为 1,给定的高度为 [2,1,5,6,2,3]。图中阴影部分为所能勾勒出的最大矩形面积,其面积为 10 个单位。示例:输入: [2,1,5,6,2,3]输出: 10题目链接:https://leetcode-cn.com/problems/largest-rectangle
2021-01-19 15:24:56 98
原创 LeetCode 42.接雨水
接雨水给定 n 个非负整数表示每个宽度为 1 的柱子的高度图,计算按此排列的柱子,下雨之后能接多少雨水。示例 1:输入: height = [0,1,0,2,1,0,1,3,2,1,2,1]输出: 6解释: 上面是由数组 [0,1,0,2,1,0,1,3,2,1,2,1] 表示的高度图,在这种情况下,可以接 6 个单位的雨水(蓝色部分表示雨水)。示例 2:输入: height = [4,2,0,3,2,5]输出: 9提示:n == height.length0 <=
2020-12-31 18:16:38 586
原创 单调栈Monotonic Stack
Input51 4 2 3 5Output2 5 4 5 0链接:https://www.luogu.com.cn/problem/P5788单调栈:使得每次新元素入栈后,栈内的元素都保持有序的单调递增或单调递减可以把数组的元素比喻成人的身高,将这些人站成一列,从一个人开始,求他后面可见的第一个人例如样例中,元素[4],比喻一个身高为4的人,那么这个人的后面可见的第一个人就是[5],因为[2],[3]身高都比[4]矮,被挡住了。代码如下:#include<iostream.
2020-12-17 00:26:43 245
原创 Sliding Window
You are given an array of integers nums, there is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each time the sliding window moves right by one position.Return t
2020-12-14 23:06:55 91
转载 leetcode 376. Wiggle Subsequence
A sequence of numbers is called a wiggle sequence if the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may be either positive or negative. A sequence with fewer than two elemen
2020-12-14 18:12:24 88
原创 CCF201912-2 回收站选址
样例1输入71 22 10 01 11 02 00 1样例1输出00100样例2输入20 0-100000 10样例2输出00000样例3输入119 1010 1011 1012 1013 1011 911 812 910 910 1112 11样例3输出02100代码:#include<stdio.h>#include<math.h>const long lo...
2020-12-09 20:52:48 67
原创 线性分类器(CCF20200901)
思路:先构建两个结构体数组。typedef struct Node{ // x,y点坐标 F标记 -- 代入直线后结果小于0时,则将F赋值为-1,大于0则赋值为1 int x, y, F; }Node;Node flag1[maxn] = { 0 }, flag2[maxn] = { 0 };首先读取数据,判断点坐标是属于A还是B,将他们分开存入两个结构体数组flag1,flag2之中。// n个已知类别的点 m个查询直线方程表达式 i遍历用的变量 x,y点坐标 a,b,c...
2020-12-05 01:01:32 206
基于python的对比度增强(线性变换、直方图正规化、直方图均衡化、CLAHE)
2022-08-04
Python期末大作业.rar
2021-07-19
CS188 吃豆人游戏 Project 2: Multi-Agent Search
2021-07-18
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人