摘要: 1. UVa 11300 我的代码: #include<iostream> #include<cstdio> #include<algorithm> using namespace std; long long C[1000010], M, a; int main() { int n; while 阅读全文
posted @ 2017-03-25 21:39 Silence、 阅读(1308) 评论(0) 推荐(0) 编辑
摘要: 94. Binary Tree Inorder Traversal 题意:中序遍历二叉树 我的思路:递归水题 我的代码: /** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; 阅读全文
posted @ 2017-03-24 15:51 Silence、 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 1、Two Sum 题意:给定一个数组和一个目标值,输出数组中值之和等于目标值的两个元素的索引值 解法一:暴力(也是自己的解法),两重循环暴搜 class Solution { public: vector<int> twoSum(vector<int>& nums, int target) { v 阅读全文
posted @ 2016-12-03 11:46 Silence、 阅读(396) 评论(0) 推荐(0) 编辑