码迷,mamicode.com
首页 > 其他好文
1 Two Sum
1 Two Sum Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of...
分类:其他好文   时间:2015-11-05 22:15:12    阅读次数:254
codevs 3304
练下线段树。。。明天加油(准确的说是后天吧。。。) 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define inc(i,l,r) for(i=l;i=r;i--) 8 #define inf 1e9 9 #define mem...
分类:其他好文   时间:2015-11-05 22:14:43    阅读次数:285
POJ 3030. Nasty Hacks 模拟水题
Nasty HacksTime Limit:1000MSMemory Limit:65536KTotal Submissions:13136Accepted:9077DescriptionYou are the CEO of Nasty Hacks Inc., a company that crea...
分类:其他好文   时间:2015-11-05 22:14:08    阅读次数:253
Linq分组
1.lin语句 int[] nums = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0, 3 }; DataTable table = new DataTable("Numbers"); table.Columns.Add(...
分类:其他好文   时间:2015-11-05 22:15:59    阅读次数:264
钱组合数
给你足够多的1,2,5面值的钱币,输入一个钱数n,设计一个程序使能够计算出所有的组合! 1 #include 2 using namespace std; 3 int main() 4 { 5 int N; 6 cin>>N; 7 int a=N/5,b=N/2; 8 ...
分类:其他好文   时间:2015-11-05 22:13:57    阅读次数:132
关于设置tomcat端口为80的事
今天有人要求tomcat服务器的访问地址不能带端口访问, 也就是说只能用80端口访问网站.那么问题来了, Ubuntu系统禁止root用户以外的用户访问1024以下的商品, 因此tomcat默认为8080也是有原因的.因此,多才多艺的网友提供了普遍的两种方案:1, 修改conf/server.xml...
分类:其他好文   时间:2015-11-05 22:13:52    阅读次数:259
LeetCode OJ:Sqrt(x)(平方根)
Implementint sqrt(int x).Compute and return the square root ofx.简单的二分法,注意mid应该选为long,否则容易溢出: 1 class Solution { 2 public: 3 int mySqrt(int x) { 4 ...
分类:其他好文   时间:2015-11-05 22:13:44    阅读次数:191
0924,函数返回多个值
class Program { //函数多个返回值 //输入参数前加Out就变成输出参数 public int jisuan(int a, int b, out int c) { c = a - b; return a + b; }public int jiefangcheng(int a, i.....
分类:其他好文   时间:2015-11-05 22:13:53    阅读次数:148
trie树(字典树)模板
参考:http://www.cnblogs.com/tanky_woo/archive/2010/09/24/1833717.html#include#includeusing namespace std;const int MAX=26;struct Trie{ Trie *next[MAX...
分类:其他好文   时间:2015-11-05 22:11:36    阅读次数:189
全局引用文件->pch
Xcode6.0以后不会自动创建全局引用文件pch,1>New file--->Other--->pch文件 2.>Build Phases--->Prefix Header把路径改为相对路径-->
分类:其他好文   时间:2015-11-05 22:11:30    阅读次数:120
HDOJ 2317. Nasty Hacks 模拟水题
Nasty HacksTime Limit: 3000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3049Accepted Submission(s): 2364Problem...
分类:其他好文   时间:2015-11-05 22:11:59    阅读次数:240
使用xib封装一个自定义view的步骤
1> 新建一个AppView.xib文件来描述AppView内部的结构2> 新建一个继承UIView的自定义view,假设类名叫做(appView)3> 修改UIView的类型为appView真实类型4> 将内部的子控件跟appView进行属性连线5> appView提供一个模型属性6> 重写模型属...
分类:其他好文   时间:2015-11-05 22:08:37    阅读次数:173
Map阶段分析之Spill阶段
如上次分析,其实map函数中的context.write()调用过程如下所示: 梳理下调用过程,context的write方法其实是调用了TaskInputOutputContext类的write方法,而在这个write方法内部又调用了output字段的write方法,这个output字段是N...
分类:其他好文   时间:2015-11-05 22:10:28    阅读次数:1536
HDU 5124 lines(BestCoder Round #20)
Problem Description:John has several lines. The lines are covered on the X axis. Let A is a point which is covered by the most lines. John wants to kn...
分类:其他好文   时间:2015-11-05 22:08:01    阅读次数:315
个人对大学学习的看法
目前在中国,基本所有学生在大学以前都是专心只干一件事,那就是考高分,为了将来考上好大学。但到了大学就明显不一样了,有一小部分人的观念会发生很大的转变,一部分人和以前一样好好上课解题,考试都是排在前列,拿奖学金帮家里减轻负担,同时也打算上研,还有一部分人喜欢修养身心。现在就我自身而言来谈谈我对大学的看...
分类:其他好文   时间:2015-11-05 22:09:20    阅读次数:236
***NSFileManager
1、常见的NSFileManager文件方法-(NSData *)contentsAtPath:path //从一个文件读取数据-(BOOL)createFileAtPath: path contents:(NSData *)data attributes:attr //向一个文件写入数据-(B.....
分类:其他好文   时间:2015-11-05 22:08:31    阅读次数:174
CATransform3D方法汇总
CATransform3D三维变换struct CATransform3D{ CGFloat m11, m12, m13, m14; CGFloat m21, m22, m23, m24; CGFloat m31, m32, m33, m34; CGFloat m41, m42, m43, ...
分类:其他好文   时间:2015-11-05 22:09:32    阅读次数:183
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!