题:https://leetcode.com/problems/product-of-array-except-self/description/ 题目 Given an array nums of n integers where n > 1, return an array output such that output[i] is equal to the product of all
字符串处理题 B. Domino Effect time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Little Chris knows there's no fun in playing
A. Gravity Flip time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output 大水题,直接排序输出 Little Chris is bored during his physics les
A. Gravity Flip 直接sort一下就ok了。貌似div.2的第一题都习惯于sort... B. Domino Effect 题意应该都能懂吧,求最后还竖立的个数。 因为题目说到两个L之间肯定有一个R,两个R直接就肯定会有个L,所以遍历一遍过去。找到L(非第一个),就找L后面的R,L和R之间肯定最后都是竖立。找到R,就往后面找L,判断两者之间的骨诺米牌个数的奇偶性,为奇数,则+
Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums except nums[i]. Solve it without division and in O(n).