普通排序:直接分配一个同等大小的数组,反向copy即可.char* Reverse(char*
s){ //将q指向字符串最后一个字符 char* q = s ; while( *q++ ) ; q -= 2 ; //分配空间,存储逆序后的字符串。
char* p = newchar[sizeof(...
分类:
其他好文 时间:
2014-05-12 16:30:14
阅读次数:
338
Problem DescriptionGiven n integers.You have two
operations:U A B: replace the Ath number by B. (index counting from 0)Q A B:
output the length of the...
分类:
其他好文 时间:
2014-05-06 01:20:33
阅读次数:
332
前提知识任何主机若要与非同网络中的主机通信,则必须将报文发送到默认网关;对Linux而言,IP地址是属于主机(内核中)的,不属于网卡,只要属于当前主机的IP地址间,都可直接响应,不称为转发私有地址在路由器上是不允许被路由的防火墙的类型与作用的链主机防火墙:一般使用INPUT,OUTPUT链来过滤进入...
分类:
Web程序 时间:
2014-05-05 23:50:41
阅读次数:
526
【题目】
Problem E
Open Credit System
Input: Standard Input
Output: Standard Output
In an open credit system, the students can choose any course they like, but there is a problem. Some of the stude...
分类:
其他好文 时间:
2014-05-03 00:22:50
阅读次数:
380
Problem I
Automatic Poetry
Input: standard input
Output: standard output
Time Limit: 2 seconds
Memory Limit: 32 MB
“Oh God”, Lara Croft exclaims, “it’s one of these dumb rid...
分类:
其他好文 时间:
2014-05-02 22:51:52
阅读次数:
352
package ioTest.io1;
import java.io.FileReader;
import java.io.FileWriter;
/*将d盘的文件复制到e盘
* Copy的原理:
* 读取d盘的文件内容,然后写入到e盘的同名文件中。(同名文件需要创建)
*
*/
public class CopyText {
public static void main(St...
分类:
编程语言 时间:
2014-05-02 19:34:41
阅读次数:
432
胡乱写了一些代码/*
============================================================================
Name : sqlist.c Author :codecup Version : Copy...
分类:
其他好文 时间:
2014-05-02 17:22:31
阅读次数:
356
UIView的常见属性 1 @property(nonatomic,readonly)
UIView *superview; 2 获得自己的父控件对象 3 4 @property(nonatomic,readonly,copy) NSArray
*subviews; 5 获得自己的所有子控件对象.....
分类:
其他好文 时间:
2014-05-02 14:53:07
阅读次数:
249
29. 数组中出现次数超过一半的数字. 方法a. 排序取中 O(nlogn). 方法b.
partition 函数分割找中位数 >=O(n). 方法c. 设计数变量,扫描一遍。 O(n).#include bool Invalid_Input
= false;int getNumber(int da...
分类:
其他好文 时间:
2014-05-02 10:46:15
阅读次数:
340
Steps:
1. backup database DBmirror on SQL1
2. backup database log
3. copy db and log backup files to SQL2
4. restore db with norecovery
5. restore log with norecovery
6. create endpoints on both...
分类:
数据库 时间:
2014-04-30 22:15:38
阅读次数:
414