原题地址:http://oj.leetcode.com/problems/swap-nodes-in-pairs/题意:将链表中的节点两两交换。Given1->2->3->4,
you should return the list as2->1->4->3.解题思路:这题主要涉及到链表的操作,没什么...
分类:
编程语言 时间:
2014-05-01 06:44:21
阅读次数:
339
原题地址:http://oj.leetcode.com/problems/remove-nth-node-from-end-of-list/题意:Given
a linked list, remove thenthnode from the end of list and return its he...
分类:
编程语言 时间:
2014-05-01 06:42:15
阅读次数:
332
相信使用过MFC编程的朋友对CString这个类的印象应该非常深刻吧?的确,MFC中的CString类使用起来真的非常的方便好用。但是如果离开了MFC框架,还有没有这样使用起来非常方便的类呢?答案是肯定的。也许有人会说,即使不用MFC框架,也可以想办法使用MFC中的API,具体的操作方法在本文最后给...
分类:
其他好文 时间:
2014-05-01 06:39:08
阅读次数:
328
#include#include#includeusing namespace std;int
main(){ int n,i; char a[100000]; cin>>a; sort(a,a+strlen(a)); do{
cout<<a<<endl; }while(next_permut...
分类:
其他好文 时间:
2014-05-01 06:20:37
阅读次数:
368
在进入java平台的线程对象之前,基于基础篇(一)的一些问题,我先插入两个基本概念。
[线程的并发与并行]
在单CPU系统中,系统调度在某一时刻只能让一个线程运行,虽然这种调试机制有多种形式(大多数是时间片轮巡为主),但无论如何,要通过不断切换需要运行的线程让其运行的方式就叫并发(concurr.....
分类:
编程语言 时间:
2014-05-01 06:09:22
阅读次数:
459
1. 类型clock_t:
是个long型,用来记录一段时间内的时钟计时单元数,即CPU的运行单元时间。size_t: 标准C库中定义的,应为unsigned
int,在64位系统中为long unsigned int。time_t: 从1970年1月1日0时0分0秒到该时间点所经过的秒数。stru...
分类:
其他好文 时间:
2014-05-01 06:03:10
阅读次数:
289
首先:我们建立一个超类:Clothes: public abstract class
Clothes { public string Look = "beautiful"; public string Getlook() { ...
分类:
其他好文 时间:
2014-05-01 05:33:23
阅读次数:
231
废话不多说,直接通过例子来说明POI的使用:1.一个创建excel并写入数据的小例子,参照网上的一个例子:public class CreateXL { /**
* @param args */ public static String outputFile="D:\\t...
分类:
其他好文 时间:
2014-05-01 05:18:04
阅读次数:
426
利用boost来获取当前时间又方便快捷,还不用考虑跨平台的问题。1.
输出YYYYMMDD[cpp]view
plaincopy#include#defineBOOST_DATE_TIME_SOURCEstd::stringstrTime=boost::gregorian::to_iso_strin...
分类:
其他好文 时间:
2014-05-01 05:13:57
阅读次数:
418
1 保留小数点后两位#include cout const char * spilt="/";char
*p;p=strtok(str,spilt);while(p!=NULL){ //cout
#includesort(Rs.begin(),Rs.end());sort(Rs.begin(),Rs...
分类:
编程语言 时间:
2014-05-01 05:05:45
阅读次数:
409