Time of Update: 2018-12-05
//其實是一道水題,但是可以用它來學習雙向迴圈鏈表的構建和基本使用方法#include<iostream>#include<cstring>using namespace std;struct List//雙向鏈表結構體{char name[20];struct List *front;//前指標struct List *rear;//後指標};List* create(int n)//建構函式,再過幾天嘗試將這些函數整合成C++的類模板,應該會更簡潔{List
Time of Update: 2018-12-05
DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located within the whole array. The sum of a rectangle is the sum of all the elements in that rectangle.
Time of Update: 2018-12-05
P2psim原始碼分析五Kejieleung Node類作為所有協議的基礎類,提供了很多相關的基礎操作與虛函數介面供具體實現協議使用,如處理topology檔案的處理函數static void
Time of Update: 2018-12-05
最近在學習動態規劃,將自己的所思所想所得記錄下來,檢驗自己是否真正懂了。 問題描述:給定一個數組,記錄一串數字,可正可負,現要求出其中最大的連續子段和。 用數組A[N]記錄所要求的數組,用數組B[N]來記錄連續子段和的狀態通過分析,可以知道:當B[K]>0時,無論B[K]為何值,B[K]=B[K-1]+A[K]當B[K]<0時,也就是B[K]記錄到一個A[J]是負的,可以把B[K]變成負的,那麼B[J]記錄的這一段應該截掉,應為無論後面的A[K]多大,加上個負數總不可能是最大的子段和
Time of Update: 2018-12-05
一、問題建立測試環境語句:CREATE TABLE [TABLE1] ([iCode] [int] NOT NULL,[iDate] [char] (50) NULL,[State] [char] (50) NULL)ALTER TABLE [TABLE1] WITH NOCHECK ADD CONSTRAINT [PK_TABLE1] PRIMARY KEY NONCLUSTERED ( [iCode] )INSERT [TABLE1]
Time of Update: 2018-12-05
//////////////////////////////////////////////////////////////////////////// Fundamentals of Compiler//project: World analysis//written by: kejie 03 computer science and techology 086//create time: 2006.4.5//modified: 2006.4.15//file
Time of Update: 2018-12-05
//深度優先搜尋//這道題最大的收穫就是學會了深搜的卡時//TLE了N次之後,看了論壇上趙大牛的指點,用卡時就過了,0.14MS//在做深搜題的時候,有些題目是不需要搜尋那麼多次的,當超過某個次數時可以當做搜尋不出答案了。//這樣的做法雖然無法保證正確性,但是可以大大提高效率//因此在這道題用了t這個全域變數記錄搜尋的次數,當t超過4000次時,dfs直接return,不用再搜尋了,這樣就不會TLE了#include<iostream>#include<cstring>u
Time of Update: 2018-12-05
CxImage類庫是一個優秀的映像操作類庫。它可以快捷地存取、顯示、轉換各種映像。用這些類庫,你要被這樣那樣的許可協議所束縛。在這點上,CxImage類庫是完全免費的。另外,在使用上述類庫時,你會遇到重重麻煩。因為它們大部分是平台無關的,且用C語言寫成,有的還夾雜著基本的C++ wrapper和成堆德編譯選項的聲明需要你去處理。而CxImage類庫在這方面做得很好。 CxImage是一個可以用於MFC 的C++類,可以開啟,儲存,顯示,轉換各種格式的影像檔,比如BMP, JPEG,
Time of Update: 2018-12-05
//BFS深度優先搜尋+全排列編碼(康托展開)#include<iostream>#include<queue>#include<string>using namespace std;int fact[9] = {0,1,2,6,24,120,720,5040,40320};//階乘表string str;//Null 字元串struct move{int num;//狀態string di;//操作記錄bool vis;//記錄是否被訪問過}step[403
Time of Update: 2018-12-05
一個簡單的使用SOAP協議調用Webservice實現 #include <stdio.h>#include <tchar.h>#include <windows.h>#include <iostream>#include <string>#pragma comment(lib,"ws2_32.lib")#define REQ_LEN 1024#define RECV_LEN 1024inline bool CHECK_PARAM(
Time of Update: 2018-12-05
//資料結構——棧//先開一個數字然後標記號是couple的編號//接著從1~2n一個個塞進棧中,同時調用couple數組進行檢查,看是否能與棧頂元素合并//如果能合并,就從棧頂中移除//到最後如果棧頂為空白,則說明能夠全部移除#include<iostream>#include<stack>#include<cstring>using namespace std;int couple[200010];int main(){int
Time of Update: 2018-12-05
〔分享〕如何在收件匣建立簡訊----by cxt_programmer// Author: Liguopeng & Chenxiaotian// aAddr[in]: addresser number// aContent[in]: sms contentvoid CSmsMonitorEngine::CreateNewMessageL(const TDesC& aAddr, const TDesC& aContent){ const TInt LEN =
Time of Update: 2018-12-05
//最短路徑——Dijkstra演算法//此題的關鍵在於等級限制的處理,最好的辦法是採用枚舉,即假設酋長等級為5,等級限制為2,那麼需要枚舉等級從3~5,4~6,5~7//從滿足改等級範圍的結點組成的子圖中用Dijkstra來算出最短路徑//小結,通過枚舉的方式可以消除一些圖與圖之間的限制#include<iostream>#include<cmath>#define INF 200000000#define MAX 101using namespace std;int
Time of Update: 2018-12-05
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONgo-- =============================================-- Author: <Author,,Name>-- Create date: <Create Date,,>-- Description: <擷取各車隊申請用車情況,按車隊分組(指定時間片內)>-- ============================
Time of Update: 2018-12-05
關於二分匹配演算法的介紹,推薦這個部落格網址,寫得非常漂亮http://chhaj5236.blog.163.com/blog/static/1128810812009910102617216/感謝這位博主給我很大的啟示,以及JSH同學的大力詳細講解。//最大二分匹配——匈牙利演算法
Time of Update: 2018-12-05
編程時經常遇到一些編譯錯誤,這些都是我遇到過的,去百度、Google找了半天找到的,現在整理一下,方便以後尋找。。。統一格式:ID.【錯誤提示】:編譯器提示的錯誤資訊 【說 明】:產生此錯誤的根本原因 【解決方案】:解決此錯誤的具體方法 1. 【錯誤提示】: libcmtd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main 【說 明】:
Time of Update: 2018-12-05
//BFS統計可以行動的地圖點數#include<iostream>#include<cstring>#include<queue>using namespace std;char map[22][22];bool in_queue[450];//標記是否進過隊列int ans;int X,Y;inline int xy_p(int x,int y){return y*X + x;}inline int p_x(int p){return
Time of Update: 2018-12-05
1.HASH函數的聲明問題template <class _Key, class _Tp, class _HashFcn = hash<_Key>,class _EqualKey = equal_to<_Key>,class _Alloc = __STL_DEFAULT_ALLOCATOR(_Tp) >class hash_map{ ...}也就是說,在上例中,有以下等同關係:...hash_map<int, string>
Time of Update: 2018-12-05
發信人: kyhpudding (只要衫除實得~), 信區: CS 標 題: IT 民工男的 CS 課程記憶 發信站: 逸仙時空 Yat-Sen Channel (Sun Mar 7 16:42:31 2010), 轉信先介紹下自己, 03CS 本科在某更懂中文的地方混了兩年多, 做社區產品, 後來做基礎平台帶項目帶新人前端到後端應用到底層跟各部門死磕無處不折騰每年都為可以公費回廣東回來校招, 據說是殺手, 不過我不覺得最近在一以企鵝為吉祥物的公司繼續折騰此文僅代表個人觀點,
Time of Update: 2018-12-05
//////////////////////////////////////////////////////////////////////////// Fundamentals of Compiler//project: World analysis//written by: kejie 03 computer science and techology 086//create time: 2006.3.25//modified: 2006.4.2//file