Maximal
[LeetCode] 2530. Maximal Score After Applying K Operations
You are given a 0-indexed integer array nums and an integer k. You have a starting score of 0. In one operation: choose an index i such that 0 <= i < ......
[LeetCode] 85. Maximal Rectangle_Hard tag: Dynamic Programming
Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example 1: Input: matri ......
1142 Maximal Clique(附测试点1,3错误分析)
题目: A clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent. A maximal clique is a cl ......
[LeetCode][221]maximal-square
# Content Given an m x n binary matrix filled with 0's and 1's, find the largest square containing only 1's and return its area. Example 1: Input: mat ......
[LeetCode][85]maximal-rectangle
# Content Given a rows x cols binary matrix filled with 0's and 1's, find the largest rectangle containing only 1's and return its area. Example 1: In ......
CF803C Maximal GCD 题解
## 题意 构造一个长度为 $k$,和为 $n$ 的严格单调递增序列,并最大化其最大公约数。 ($1 \le n,k \le 10^{10}$) ## 题解 首先可以发现一个事实,这个序列的最大公约数一定为 $n$ 的因子。所以我们可以考虑枚举 $n$ 的所有因子并判断其能否成为整个序列的最大公约数 ......
1699H - Maximal And
思路: 0. 只有所有数这一位是1 &结果才为1 1. 想要得出最大值,高位越大越好 所以从高位开始操作 2. 记录所有数字的每位 为1的cnt[位数]++ 然后那位需要操作的次数为 n-cnt[位数]3. 优先执行:操作数给高位 如果操作数不够使高位&后结果改变 则给可以被改变的最高位 4. 终止 ......
LeetCode 85. Maximal Rectangle
class Solution { public: int method(vector<int> h)//求柱状图中最大的矩形 { int n=h.size(); vector<int> l=vector<int> (n),r=l; stack<int> st; //预处理l,r数组 for(int ......