Weekly Contest 367 周赛题目解析

Posted on Sun 15 October 2023 in Leetcode • Tagged with Contest

2023-10 Leetcode Weekly Contest 367 第 367 场力扣周赛 | 2903. Find Indices With Index and Value Difference I 找出满足差值条件的下标 I | 2904. Shortest and Lexicographically Smallest Beautiful String 最短且字典序最小的美丽子字符串 | 2905. Find Indices With Index and Value Difference II 找出满足差值条件的下标 II | 2906. Construct Product Matrix 构造乘积矩阵 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 366 周赛题目解析

Posted on Mon 09 October 2023 in Leetcode • Tagged with Contest

2023-10 Leetcode Weekly Contest 366 第 366 场力扣周赛 | 2894. Divisible and Non-divisible Sums Difference 分类求和并作差 | 2895. Minimum Processing Time 最小处理时间 | 2896. Apply Operations to Make Two Strings Equal 执行操作使两个字符串相等 | 2897. Apply Operations on Array to Maximize Sum of Squares 对数组执行操作使平方和最大 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 365 周赛题目解析

Posted on Thu 05 October 2023 in Leetcode • Tagged with Contest

2023-10 Leetcode Weekly Contest 365 第 365 场力扣周赛 | 2873. Maximum Value of an Ordered Triplet I 有序三元组中的最大值 I | 2874. Maximum Value of an Ordered Triplet II 有序三元组中的最大值 II | 2875. Minimum Size Subarray in Infinite Array 无限数组的最短子数组 | 2876. Count Visited Nodes in a Directed Graph 有向图访问计数 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 364 周赛题目解析

Posted on Sun 01 October 2023 in Leetcode • Tagged with Contest

2023-09 Leetcode Weekly Contest 364 第 364 场力扣周赛 | 2864. Maximum Odd Binary Number 最大二进制奇数 | 2865. Beautiful Towers I 美丽塔 I | 2866. Beautiful Towers II 美丽塔 II | 2867. Count Valid Paths in a Tree 统计树中的合法路径数目 | Solution to contest problems 赛题讲解


Continue reading

解决Foobar挑战(四)- 终篇

Posted on Sat 30 September 2023 in Computer Science • Tagged with Google Foobar

接上回书,我们来到了Foobar挑战的第五层,题目越来越困难了。本题主要涉及一些数论和组合数学的知识点。


Continue reading

Weekly Contest 363 周赛题目解析

Posted on Sat 23 September 2023 in Leetcode • Tagged with Contest

2023-09 Leetcode Weekly Contest 363 第 363 场力扣周赛 | 2859. Sum of Values at Indices With K Set Bits 计算 K 置位下标对应元素的和 | 2860. Happy Students 让所有学生保持开心的分组方法数 | 2861. Maximum Number of Alloys 最大合金数 | 2862. Maximum Element-Sum of a Complete Subset of Indices 完全子集的最大元素和 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 362 周赛题目解析

Posted on Sun 17 September 2023 in Leetcode • Tagged with Contest

2023-09 Leetcode Weekly Contest 362 第 362 场力扣周赛 | 2848. Points That Intersect With Cars 与车相交的点 | 2849. Determine if a Cell Is Reachable at a Given Time 判断能否在给定时间到达单元格 | 2850. Minimum Moves to Spread Stones Over Grid 将石头分散到网格图的最少移动次数 | 2851. String Transformation 字符串转换 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 359 周赛题目解析

Posted on Thu 31 August 2023 in Leetcode • Tagged with Contest

2023-08 Leetcode Weekly Contest 359 第 359 场力扣周赛 | 2828. Check if a String Is an Acronym of Words 判别首字母缩略词 | 2829. Determine the Minimum Sum of a k-avoiding Array k-avoiding 数组的最小总和 | 2830. Maximize the Profit as the Salesman 销售利润最大化 | 2831. Find the Longest Equal Subarray 找出最长等值子数组 | Solution to contest problems 赛题讲解


Continue reading

Weekly Contest 358 周赛题目解析

Posted on Wed 30 August 2023 in Leetcode • Tagged with Contest

2023-08 Leetcode Weekly Contest 358 第 358 场力扣周赛 | 2815. Max Pair Sum in an Array 数组中的最大数对和 | 2816. Double a Number Represented as a Linked List 翻倍以链表形式表示的数字 | 2817. Minimum Absolute Difference Between Elements With Constraint 限制条件下元素之间的最小绝对差 | 2818. Apply Operations to Maximize Score 操作使得分最大 | Solution to contest problems 赛题讲解


Continue reading

Airline Empire之使用二次规划解决航线的最佳座位排布

Posted on Mon 21 August 2023 in Computer Science

本文探讨了在线航空公司经营游戏Airline Empires中,如何通过最佳座位配置来提升盈利能力。从游戏机制到座位优化,逐步引导读者了解如何运用混合整数二次规划来提升游戏中的航线盈利。This article explores how optimal seating configurations can be used to improve profitability in Airline Empires, an online airline operating game. From game mechanics to seat optimization, the reader is guided step-by-step through how to use Mixed-Integer Quadratic Programming (MIQP) to improve airline profitability in the game.


Continue reading