码迷,mamicode.com
首页 > 其他好文
LeetCode 022 Generate Parentheses
题目描述:Generate ParenthesesGivennpairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, givenn= 3, ...
分类:其他好文   时间:2015-02-07 17:25:12    阅读次数:128
全局网络检测
转载于:http://my.oschina.net/meilidashijie/blog/99533 1 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)la...
分类:其他好文   时间:2015-02-07 17:24:54    阅读次数:134
LeetCode 029 Divide Two Integers
题目要求:Divide Two IntegersDivide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.分析:不能用乘、除和取余,则只能...
分类:其他好文   时间:2015-02-07 17:23:16    阅读次数:121
凝结时光:ImageMagick 制作 gif
从去年12.12开始,工作日都会从单位的落地窗向外拍一张照片,有点每日打卡的意思。weekday 是一天不落的,weekend 不是每次都到单位,落了几次。想法来自上学的时候,有同学在同一个地方,拍北洋广场的一年四季,做成 gif,非常漂亮。自己就也想试一下,于是就动手了。干货开始。工具:shell...
分类:其他好文   时间:2015-02-07 17:22:13    阅读次数:136
HDU 3436 Queue-jumpers Splay
这题用Splay写得我蛋疼菊紧,4000b的代码还有debug半天,看来我的splay姿势还不够好a = =首先N是很大的,所以离散化是必然的,把要Top操作的和要Query操作的编号单独划分为一个区间,然后再中间会产生其他的区间,把这些区间缩点,然后离散化就好了。三个操作其实不难实现,Top操作只...
分类:其他好文   时间:2015-02-07 17:22:38    阅读次数:222
用12306购票所想到的(改善的地方)
12306网站为何没有这样一个功能,就是以身份证查询功能呢?登录12306网站之后,应该有一个功能,以注册者身份证号查询本身份证所有购票记录,包括历史和将要乘坐的。重点一点就是别人使用当前这个身份证号购买记录也应该能够查询得到。为了信息安全,不能输入别人的身份证号来查询。查询到的信息还有管理的功能,...
分类:其他好文   时间:2015-02-07 17:23:42    阅读次数:156
点击头像显示大图Dialog
1、实现效果点击头像 弹出全屏dialog,长按图片弹出“保存图片对话框”,短按dialog消失。package com.example.widget;import android.app.Dialog;import android.content.Context;import android.gr...
分类:其他好文   时间:2015-02-07 17:20:30    阅读次数:185
LeetCode 025 Reverse Nodes in k-Group
题目描述:Reverse Nodes in k-GroupGiven a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is ...
分类:其他好文   时间:2015-02-07 17:22:26    阅读次数:146
frame的运用
需求是做一个左边导航右边显示内容的网页。首先需要先用框架frameset分割出两个页面,代码如下: 接下来设置右边主内容框: (这个name非常重要,有了它就可以用target来把页面导入这个页面,) frame标签中还可以添加许多属性,比如(frameborder=“1”或“2”用来表示是否...
分类:其他好文   时间:2015-02-07 17:21:41    阅读次数:169
结合之前博客中的代码产生的牛顿求根法
cdouble DX = 0.00001;dFun Deriv (dFun g){ return [g] ( cdouble &x) { auto delta_x = x + DX; return (g(delta_x) - g(x)...
分类:其他好文   时间:2015-02-07 17:19:36    阅读次数:161
LeetCode 020 Valid Parentheses
题目描述:Valid ParenthesesGiven a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must...
分类:其他好文   时间:2015-02-07 17:19:20    阅读次数:217
LeetCode 023 Merge k Sorted Lists
题目要求:Merge k Sorted ListsMergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.分析:参考网址:http://blog.csdn.net/...
分类:其他好文   时间:2015-02-07 17:19:56    阅读次数:194
POJ 2155 Matrix【二维线段树】
题目大意:给你一个全是0的N*N矩阵,每次有两种操作:1将矩阵中一个子矩阵置反,2.查询某个点是0还是1思路:裸的二维线段树#include#include#include #include#include#include#define MOD 1000003#define maxn 4009#de...
分类:其他好文   时间:2015-02-07 17:18:39    阅读次数:199
hdu 5063 Operation the Sequence
http://acm.hdu.edu.cn/showproblem.php?pid=5063思路:因为3查询最多50,所以可以在查询的时候逆操作找到原来的位置,然后再求查询的值。 1 #include 2 #include 3 #include 4 #include 5 #define ll...
分类:其他好文   时间:2015-02-07 17:18:03    阅读次数:158
LeetCode 026 Remove Duplicates from Sorted Array
题目描述:Remove Duplicates from Sorted ArrayGiven a sorted array, remove the duplicates in place such that each element appear onlyonceand return the new ...
分类:其他好文   时间:2015-02-07 17:18:43    阅读次数:140
xscript脚本
最近看《游戏脚本高级编程》,然后顺便把里面实现的虚拟机,汇编器以及编译器手动用C++重写了一遍,原版书中提供的代码,风格不是很好,而且有几处BUG。我现在开源的代码中已经修复了BUG,而且有些地方做了一些改进。 这本书对我的帮助很大,虽然作者比较啰嗦,代码风格也不是很好,但是作者写的很简单明了...
分类:其他好文   时间:2015-02-07 17:16:28    阅读次数:191
LeetCode 019 Remove Nth Node From End of List
题目描述:Remove Nth Node From End of ListGiven a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list:.....
分类:其他好文   时间:2015-02-07 17:18:36    阅读次数:128
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!