![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
暴力枚举
没事码代码的渣渣
略略略略略略
展开
-
【LeetCode】1. 两数之和
题目描述给定一个整数数组 nums和一个目标值 target,请你在该数组中找出和为目标值的那两个整数,并返回他们的数组下标。你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。示例:给定 nums = [2, 7, 11, 15], target = 9因为 nums[0] + nums[1] = 2 + 7 = 9所以返回 [0, 1]代码:int* twoSum(int* nums, int numsSize, int target, ...原创 2020-07-03 21:03:53 · 103 阅读 · 0 评论 -
Codeforces Round #535 (Div. 3) Nice Garland
Codeforces Round #535 (Div. 3) Nice Garland这题之前死活读不懂,看别人代码后,自己写的代码又有错,对照别人代码,半天改不出来!!!真的急,测试数据太坑了,最后还是改好了。You have a garland consisting ofnnlamps. Each lamp is colored red, green or blue. The ...原创 2019-03-07 01:03:56 · 228 阅读 · 0 评论