链接: https://codeforces.com/contest/1245/problem/B 题意: Let n be a positive integer. Let a,b,c be nonnegative integers such that a+b+c=n. Alice and Bob ...
分类:
其他好文 时间:
2019-11-05 13:21:51
阅读次数:
122
原题链接在这里:https://leetcode.com/problems/last-stone-weight-ii/ 题目: We have a collection of rocks, each rock has a positive integer weight. Each turn, we ...
分类:
其他好文 时间:
2019-11-03 10:27:37
阅读次数:
81
原题链接在这里:https://leetcode.com/problems/last-stone-weight/ 题目: We have a collection of rocks, each rock has a positive integer weight. Each turn, we cho ...
分类:
其他好文 时间:
2019-11-03 10:26:45
阅读次数:
81
1237 Find Positive Integer Solution for a Given Equation 找出给定方程的正整数解 问题描述 给出一个函数 和一个目标结果 ,请你计算方程 所有可能的正整数 数对 和 。 给定函数是严格单调的,也就是说: `f(x, y) 输入: functio ...
分类:
其他好文 时间:
2019-11-02 12:17:45
阅读次数:
116
题目描述: Given an unsorted integer array, find the first missing positive integer. For example,Given[1,2,0] return 3,and [3,4,-1,1] return 2.Your algorit ...
分类:
其他好文 时间:
2019-10-31 16:35:06
阅读次数:
114
D - Ugly Problem HDU - 5920 Everyone hates ugly problems. You are given a positive integer. You must represent that number by sum of palindromic numbe ...
分类:
其他好文 时间:
2019-10-29 23:36:48
阅读次数:
99
Consider a multiset of integers S, the union of n closed intervals of positive integers: S = [l1..r1] ∪ [l2..r2] ∪ · · · ∪ [ln..rn](recall that a clos ...
分类:
其他好文 时间:
2019-10-25 09:33:27
阅读次数:
61
leetcode第41题,缺失的第一个正数 对于这道题,利用的是桶排序的思想,桶排序也就是利用数组的下标和值对应的关系,也就是说下标为0的索引对应的值应该就是0,依次类推n对应n 但是这只是一种对应关系,也就是说我们不仅仅只局限于这种关系,只要有合理的对应关系即可,那么这题要求从1开始第一个没有的正 ...
分类:
其他好文 时间:
2019-10-23 09:17:16
阅读次数:
95
题目描述: Two players, Stan and Ollie, play, starting with two natural numbers. Stan, the first player, subtracts any positive multiple of the lesser of t ...
分类:
其他好文 时间:
2019-10-22 20:12:40
阅读次数:
106
41. First Missing Positive Hard 2193655FavoriteShare 41. First Missing Positive Hard 2193655FavoriteShare Hard Given an unsorted integer array, find t ...
分类:
其他好文 时间:
2019-10-19 21:10:59
阅读次数:
100