一道水题,练练字符串的输入输出 1 #include 2 #include 3 4 using namespace std; 5 char s1[15] , s2[15]; 6 7 int get_num(char *s) 8 { 9 if(s[0] == 'z') return 0...
分类:
其他 时间:
2015-01-01 00:05:39
收藏:
0 评论:
0 赞:
0 阅读:
323
1.导入ASIHTTPRequest第三方类库下载地址:ASIHttpRequest类库 完整代码下载:下载2.在 .h 文件中[cpp]view plaincopy#import#import"ASIHTTPRequest.h"#import"ASINetworkQueue.h"@inter...
分类:
移动平台 时间:
2015-01-01 00:05:29
收藏:
0 评论:
0 赞:
0 阅读:
336
用分桶的做法,思路参考自网友,很精妙。class Solution {public: int maximumGap(vector &num) { int size = num.size(); if (size minBucket(bucketSize, INT_M...
分类:
其他 时间:
2015-01-01 00:05:09
收藏:
0 评论:
0 赞:
0 阅读:
306
DP.类似最大和。就是要记录正的和负的两种情况。class Solution {public: int maxProduct(int A[], int n) { vector positive(n); vector minus(n); int resu...
分类:
其他 时间:
2015-01-01 00:04:39
收藏:
0 评论:
0 赞:
0 阅读:
313
转载:http://www.ibm.com/developerworks/cn/linux/l-btloader/1. 引言在专用的嵌入式板子运行 GNU/Linux 系统已经变得越来越流行。一个嵌入式 Linux 系统从软件的角度看通常可以分为四个层次:1. 引导加载程序。包括固化在固件(firm...
分类:
其他 时间:
2015-01-01 00:04:29
收藏:
0 评论:
0 赞:
0 阅读:
304
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next...
分类:
其他 时间:
2015-01-01 00:04:09
收藏:
0 评论:
0 赞:
0 阅读:
333
每次只能有一组数字进行交换,最后达到逆序效果我们可以这样理解,我们总是希望每次将一个数摆到正确的位置上,那么这样一个数有顺时针逆时针两个方向移动的机会,我们总是挑移动次数少的一个方向那么我们排列前前一半数字,就将其逆时针排,这样次数比较少而后一半就顺时针排自己就能得到两个等差数列了 1 #inclu...
分类:
其他 时间:
2015-01-01 00:03:49
收藏:
0 评论:
0 赞:
0 阅读:
306
RC4加密算法RC4加密算法是大名鼎鼎的RSA三人组中的头号人物Ron Rivest在1987年设计的密钥长度可变的流加密算法簇。之所以称其为簇,是由于其核心部分的S-box长度可为任意,但一般为256字节。该算法的速度可以达到DES加密的10倍左右,且具有很高级别的非线性。RC4起初是用于保护商业...
分类:
编程语言 时间:
2015-01-01 00:03:39
收藏:
0 评论:
0 赞:
0 阅读:
519
关于c++能做什么的解惑https://www.ptt.cc/bbs/Soft_Job/M.1352253161.A.D09.htmlhttp://subject.csdn.net/cplusplus/http://www.zhihu.com/question/20181597http://bill...
分类:
其他 时间:
2015-01-01 00:03:29
收藏:
0 评论:
0 赞:
0 阅读:
406
Given a string which contains only letters. Sort it by lower case first and upper case second.NoteIt's not necessary to keep the original order of low...
分类:
其他 时间:
2015-01-01 00:03:09
收藏:
0 评论:
0 赞:
0 阅读:
1302
题目:(Tree Stack)Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will ...
分类:
其他 时间:
2015-01-01 00:02:39
收藏:
0 评论:
0 赞:
0 阅读:
307
NSUrlConnection实现断点续传的关键是自定义http request的头部的range域属性。 Range头域 Range头域可以请求实体的一个或者多个子范围。例如, 表示头500个字节:bytes=0-499 表示第二个500字节:bytes=500-999 表示最后500个字...
分类:
移动平台 时间:
2015-01-01 00:02:29
收藏:
0 评论:
0 赞:
0 阅读:
350
这题是我们学校比赛的题目,因为当时参加精英组比赛,除了3个大二的其他都是大三大四的大神,就抱着打酱油的心态去了,结果真的打酱油了;事后看看题目,确实有些题目以当前水平是可以做出来的,原因应该是 心态 以及 时间分配上的问题.这题一直卡在题目什么意思上,还有一题 求前K大数的,那题最后想到用堆,但是不...
分类:
编程语言 时间:
2015-01-01 00:01:59
收藏:
0 评论:
0 赞:
0 阅读:
454
1 1、加载应用信息: 2 1.1、直接在controller里进行懒加载:(get方法) 3 1.1.1、先判断是否已经加载数据:if (array == nil) 4 1.1.2、先找到plist文件的路径:NSString *path = [[NSBundle mai...
分类:
其他 时间:
2015-01-01 00:01:49
收藏:
0 评论:
0 赞:
0 阅读:
343
老题目。两个栈。class MinStack { stack stk; stack minstk;public: void push(int x) { stk.push(x); if (minstk.empty() || minstk.top() >= ...
分类:
其他 时间:
2015-01-01 00:01:39
收藏:
0 评论:
0 赞:
0 阅读:
351
各种情况。有恶心的负数最值,用long long来做了。除此之外的情况下面都列出来了。/*1, 8 = 0.1251, 6 = 0.1(6)-50, 6 = -6.250, -3 = 0-1, -2147483648 = "0.0000000004656612873077392578125"*/ty...
分类:
其他 时间:
2015-01-01 00:01:29
收藏:
0 评论:
0 赞:
0 阅读:
370
本人的做法是转化成vector再处理,各种情况就比较简单了。class Solution {public: int compareVersion(string version1, string version2) { vector v1 = convert(version1); ...
分类:
其他 时间:
2015-01-01 00:01:19
收藏:
0 评论:
0 赞:
0 阅读:
356
全错位排列的介绍及其代码与算法题
分类:
其他 时间:
2015-01-01 00:01:09
收藏:
0 评论:
0 赞:
0 阅读:
382
题目链接:http://codeforces.com/problemset/problem/500/A题目意思:给出 n-1 个 cell,每个 cell 有一个值 ai,表示在这个编号为 i 的 cell,能到达i + ai 的cell,但不能反过来,即从 i+ai 到达i 这个 cell。问从第...
分类:
其他 时间:
2015-01-01 00:00:59
收藏:
0 评论:
0 赞:
0 阅读:
750
program onlyRunOne;uses Forms,Windows,SysUtils, Dialogs, Unit1 in 'Unit1.pas' {Form1};{$R *.res}varmyMutex:HWND;beginmyMutex:=CreateMutex(nil,false,.....
分类:
Windows开发 时间:
2015-01-01 00:00:49
收藏:
0 评论:
0 赞:
0 阅读:
488