一、原理: ①、先做一个实心的三角: <div class="box"> <em></em> <span></span> </div> .box em { position: absolute; top: 30px; left: 20px; width: 0; height: 0; border: ...
分类:
Web程序 时间:
2021-02-17 14:07:02
阅读次数:
0
原题链接 考察:状压dp 时隔多年的复习233,还是做出来了 思路: 参考正常版的八皇后.我们需要标记左斜线,右斜线,已放棋子的列.在正常版我们是用数组记录,这里用状压dp可以用二进制位记录.所以三个变量now标记列,left是左斜线,right是右斜线.回溯不同于正常的dfs,正常的八皇后是用fo ...
分类:
其他好文 时间:
2021-02-16 12:27:45
阅读次数:
0
原题 1 class Solution: 2 def searchRange(self, nums: List[int], target: int) -> List[int]: 3 ans,lens = [-1,-1],len(nums) 4 left,right,flag = 0,lens - 1 ...
分类:
编程语言 时间:
2021-02-15 12:26:30
阅读次数:
0
前端分页: element-UI分页组件 <!-- 分页 --> <el-pagination :current-page="page" :page-size="size" :total="total" style="padding: 30px 0; text-align: center;" lay ...
分类:
其他好文 时间:
2021-02-15 12:11:29
阅读次数:
0
原题 1 class Solution: 2 def summaryRanges(self, nums: List[int]) -> List[str]: 3 left,right,lens,ans = 0,0,len(nums),[] 4 while left < lens: 5 right = ...
分类:
其他好文 时间:
2021-02-15 11:47:09
阅读次数:
0
Given the root of a binary tree, return the leftmost value in the last row of the tree. Example 1: Input: root = [2,1,3] Output: 1 Example 2: Input: r ...
分类:
其他好文 时间:
2021-02-10 12:54:11
阅读次数:
0
DFS层次遍历,设置层数n,在node中按层数创建该层的数组,dfs时每层加入该层对应数组。 /** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNo ...
分类:
其他好文 时间:
2021-02-09 12:27:15
阅读次数:
0
给定一棵二叉搜索树,请找出其中的第k小的结点。例如, (5,3,7,2,4,6,8) 中,按结点数值大小顺序第三小结点的值为4。 重点是,如何管理kk的值与最终结果的关系。 /* struct TreeNode { int val; struct TreeNode *left; struct Tre ...
分类:
其他好文 时间:
2021-02-09 12:14:08
阅读次数:
0
# 查询主表相关信息,并且显示最新的记录 SELECT type.number as '序号', type.date as '时间', type.name as '名称', main.content as '项目名称', main.manager as '负责人', unit.name as '单位 ...
分类:
数据库 时间:
2021-02-09 12:01:19
阅读次数:
0
仅供自己学习 思路: 1.很明显,又是滑动窗口的题,只要 if判断能满足 ><,或<>就让右指针右移一个元素,并且记录长度 right-left+1。如果不满足则 left = right,再重复上述步骤 代码: 1 class Solution { 2 public: 3 int maxTurbu ...
分类:
其他好文 时间:
2021-02-09 12:00:13
阅读次数:
0