首页 > TAG信息列表 > 1609

养猪日记 2022.3.7

  Monday  晴     上周过得匆匆忙忙,就偷懒了好几天日记。   

养猪日记 2022.3.2

  Tuesday  晴     两天没写日记。   前几天投简历投的有点上火,今天走出emo.     1道算法题,背了点面试题,晚上为毕设拍了点照片。   字节过了hr初筛,下一步是业务筛,祝自己好运。     还得每天坚持背题呀!   亲亲

LeetCode 1609 Even Odd Tree (bfs)

A binary tree is named Even-Odd if it meets the following conditions: The root of the binary tree is at level index 0, its children are at level index 1, their children are at level index 2, etc.For every even-indexed level, all nodes at the level ha

【leetcode】1609. Even Odd Tree

题目如下: A binary tree is named Even-Odd if it meets the following conditions: The root of the binary tree is at level index 0, its children are at level index 1, their children are at level index 2, etc. For every even-indexed level, all nodes at th

POJ 1609

开始使用DAG的DP思路解决,然而忽略一个特殊情况,两个box倘若相同尺寸,此时就不满足DAG的限制了 这道题取了一个非常巧妙的思路,因为box的l, m是固定的(也就是说不存在可以旋转的问题),这道题巧妙的利用LIS的思路解决,在学习LIS的过程中,还顺道了解了一个O(nlogn)的算法 #include <iostream>

leetcode 1609. 奇偶树

如果一棵二叉树满足下述几个条件,则可以称为 奇偶树 : 二叉树根节点所在层下标为 0 ,根的子节点所在层下标为 1 ,根的孙节点所在层下标为 2 ,依此类推。偶数下标 层上的所有节点的值都是 奇 整数,从左到右按顺序 严格递增奇数下标 层上的所有节点的值都是 偶 整数,从左到右按顺序 严格递