题目链接:https://codeforces.com/contest/1311/problem/D 题意: 给出三个整数 a ≤ b ≤ c ,您可以添加+1 或 1 到这三个整数中的任何一个增加或减少 1 ,可以执行任意次(可能为零)次这样的操作,甚至可以一次执行多次。求执行此类操作的最少次数, ...
分类:
其他好文 时间:
2020-03-09 16:21:38
阅读次数:
43
You are given two integers nn and dd . You need to construct a rooted binary tree consisting of nn vertices with a root at the vertex 11 and the sum o ...
分类:
其他好文 时间:
2020-03-09 10:32:58
阅读次数:
52
What are Peng (Bob) Chi's top 3 strengths? Can you give an example of how one or two of those strengths has impacted you or the business? What are the ...
分类:
其他好文 时间:
2020-03-09 01:41:29
阅读次数:
66
Right now she actually isn't. But she will be, if you don't solve this problem. You are given integers n, k, A and B. There is a number x, which is in ...
分类:
其他好文 时间:
2020-03-08 16:02:10
阅读次数:
75
原题链接在这里:https://leetcode.com/problems/product-of-the-last-k-numbers/ 题目: Implement the class ProductOfNumbers that supports two methods: 1. add(int nu ...
分类:
其他好文 时间:
2020-03-08 15:45:52
阅读次数:
64
省选模拟35 1.two 线段树 对于给定的一条边,发现在另一棵树上的删边情况只有两种. $$dfn[u]r$$ 所以把所有边二元组插到另一棵树的两棵线段树里(因为用的是ta的dfn序). 在第一颗线段树u处插v,第二颗v处插u. 查询时查询区间内线段树里一维$ l/ 2.bracket 点分治+F ...
分类:
其他好文 时间:
2020-03-08 09:57:16
阅读次数:
52
名词分两类: 可数名词 是指数得过来的概念 比如:apple , pencil , student. 可数名词数量在两个或两个以上,可数名词要加s,比如 two apples , three pencils , five students 可数名词有单数和复数之分: apple-apples、pen ...
分类:
其他好文 时间:
2020-03-07 20:40:49
阅读次数:
106
1 """ 2 Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must ...
分类:
其他好文 时间:
2020-03-07 09:40:06
阅读次数:
81
Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally ident ...
分类:
其他好文 时间:
2020-03-06 15:05:00
阅读次数:
54
[剑指Offer]41 和为S的两个数字 VS 和为S的连续正数序列 Leetcode T1 Two Sum Given an array of integers, return indices of the two numbers such that they add up to a specif ...
分类:
其他好文 时间:
2020-03-06 12:41:24
阅读次数:
59