上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 25 下一页
摘要: 考虑几个特殊的情况1.若字符窜s=" "2.字符窜s=“a b d e”3.字符窜s=“ a”然后在s后面+上一个‘ ’,每次遇到s[i]为空格,s[i-1]不为空格的时候为一个单词class Solution{public: void reverseWords(string &s) ... 阅读全文
posted @ 2014-07-30 07:02 calmound 阅读(1091) 评论(0) 推荐(0) 编辑
摘要: 题1:1160十进制-十六进制注意他给的数据范围2^31,int是2^31-1View Code #includeusing namespace std;int main(){ unsigned int n; while(scanf("%u",&n)!=EOF) pr... 阅读全文
posted @ 2014-07-30 06:59 calmound 阅读(229) 评论(0) 推荐(0) 编辑
摘要: #includevoid InsertSort(int n,int a[]){ int j; for(int i=0;i=0;j--) { if(a[j]>tmp) { a[j+1]=a[j]; ... 阅读全文
posted @ 2014-07-26 10:27 calmound 阅读(134) 评论(0) 推荐(0) 编辑
摘要: #includevoid SelectSort(int n,int a[]){ for(int i=0; i<n; i++) { int MIN=a[i]; int k=i; for(int j=i+1; j<n; j++) { ... 阅读全文
posted @ 2014-07-26 10:07 calmound 阅读(132) 评论(0) 推荐(0) 编辑
摘要: #includevoid BubbleSort(int n,int a[]){ for(int i=0;ia[j+1]) { int tmp=a[j]; a[j]=a[j+1]; a... 阅读全文
posted @ 2014-07-26 09:46 calmound 阅读(128) 评论(0) 推荐(0) 编辑
摘要: #includevoid MergeArray(int first,int mid,int last,int a[]){ int k=0; int i=first,j=mid+1; int n=mid,m=last; int c[100]; while(i<=n && ... 阅读全文
posted @ 2014-07-25 17:29 calmound 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;typedef int ElemType;typedef struct Node{ ElemType data; struct Node* next;}*LinkList,Node;LinkList LinkList... 阅读全文
posted @ 2014-07-24 14:48 calmound 阅读(140) 评论(0) 推荐(0) 编辑
摘要: HRESULT D3DXCreateTextureFromFile( __in LPDIRECT3DDEVICE9 pDevice, __in LPCTSTR pSrcFile, __out LPDIRECT3DTEXTURE9 *ppTexture ); 第一个... 阅读全文
posted @ 2014-07-05 16:40 calmound 阅读(2482) 评论(0) 推荐(0) 编辑
摘要: HRESULT D3DXCreateTexture( __in LPDIRECT3DDEVICE9 pDevice, __in UINT Width, __in UINT Height, __in UINT MipLevels, __in DWORD... 阅读全文
posted @ 2014-07-05 16:34 calmound 阅读(2214) 评论(0) 推荐(0) 编辑
摘要: #include#include#includetypedef int Item;typedef struct node* PNode;typedef struct node{ Item data; PNode next;}Node;typedef struct{ PNode fr... 阅读全文
posted @ 2014-05-20 18:03 calmound 阅读(315) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 25 下一页