Greatest
AtCoder World Tour 2022 B The Greatest Two
原题面:https://atcoder.jp/contests/wtf22-day2/tasks/wtf22_day2_b 题面翻译: 一个长度为 \(n\) 的排列 \(p\),每次可以把一个长 \(k\) 区间的最大与次大值交换,问操作任意次数后可以得到的排列数量对 \(998244353\) ......
[LeetCode] 1979. Find Greatest Common Divisor of Array
Given an integer array nums, return the greatest common divisor of the smallest number and largest number in nums. The greatest common divisor of two ......
[LeetCode] 2807. Insert Greatest Common Divisors in Linked List
Given the head of a linked list head, in which each node contains an integer value. Between every pair of adjacent nodes, insert a new node with a val ......
RedShift - 从多行中取最大值(greatest)
select t.*, greatest(value1, value2, value3, value4) as greatest_value from mytable t ......
[LeetCode] 1071. Greatest Common Divisor of Strings
For two strings s and t, we say "t divides s" if and only if s = t + ... + t (i.e., t is concatenated with itself one or more times). Given two string ......
每日一题力扣 1262 https://leetcode.cn/problems/greatest-sum-divisible-by-three/
、 题解 这道题目核心就算是要知道如果x%3=2的话,应该要去拿%3=1的数字,这样子才能满足%3=0 贪心 sum不够%3的时候,就减去余数为1的或者余数为2的 需要注意 两个余数为1会变成余数为2的,所以可能减去2个余数为1 核心代码如下 public int maxSumDivThreeOth ......
[LeetCode] 1262. Greatest Sum Divisible by Three
Given an integer array nums, return the maximum possible sum of elements of the array such that it is divisible by three. Example 1: Input: nums = [3, ......
XCPC真题(2):Little Tiger vs. Deep Monkey|Greatest Common Divisor|Array Merge
🎈 作者:Eriktse 🎈 简介:19岁,211计算机在读,现役ACM银牌选手🏆力争以通俗易懂的方式讲解算法!❤️欢迎关注我,一起交流C++/Python算法。(优质好文持续更新中……)🚀 🎈 阅读原文获得更好阅读体验:https://www.eriktse.com/algorithm/ ......