You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number ...
分类:
其他好文 时间:
2020-03-20 18:39:27
阅读次数:
72
A. Bad Ugly Numbers time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given a integ ...
分类:
其他好文 时间:
2020-03-20 12:47:21
阅读次数:
68
LeetCode 0409. Longest Palindrome最长回文串【Easy】【Python】【字符串】 Problem "LeetCode" Given a string which consists of lowercase or uppercase letters, find the ...
分类:
编程语言 时间:
2020-03-19 21:26:18
阅读次数:
69
题目: Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Example 2: Input: -123 Output: -321 Example 3: Inpu ...
分类:
其他好文 时间:
2020-03-18 23:36:39
阅读次数:
72
LeetCode 0106. Construct Binary Tree from Inorder and Postorder Traversal从中序与后序遍历序列构造二叉树【Medium】【Python】【二叉树】【递归】 Problem "LeetCode" Given inorder and ...
分类:
编程语言 时间:
2020-03-18 21:58:48
阅读次数:
66
Given a string S, count the number of distinct, non-empty subsequences of S . Since the result may be large, return the answer modulo 10^9 + 7. Exampl ...
分类:
其他好文 时间:
2020-03-18 09:38:23
阅读次数:
52
Given an array of integers and an integer k, you need to find the minimum size of continuous subarrays whose sum equals to k, and return its length. i ...
分类:
其他好文 时间:
2020-03-18 09:33:00
阅读次数:
42
二叉树的直径。题意是给一个二叉树,找二叉树里面的最大直径。最大直径的定义是任意两个node之间的最大距离。例子, Given a binary tree 1 / \ 2 3 / \ 4 5 Return 3, which is the length of the path [4,2,1,3] or ...
分类:
其他好文 时间:
2020-03-18 09:24:23
阅读次数:
76
"https://codeforces.com/contest/1324/problem/F" description you are given a tree, in which the vertices are all printed either black or white. , find ...
分类:
其他好文 时间:
2020-03-18 00:04:49
阅读次数:
76
Given 2 integers u and v, find the shortest array such that bitwise-xor of its elements is u, and the sum of its elements is v. Input The only line co ...
分类:
其他好文 时间:
2020-03-17 08:26:52
阅读次数:
63