摘要:
设a>=1和b>1为常数,设f(n)为一函数,T(n)由递归式T(n)=aT(n/b)+f(n);对于非负整数定义,其中n/b指n/b上区间和下区间。那么T(n)可能有如下渐近界:1)若对于某常数e>0.f(n)=O(n^(logb(a)-e)),则T(n)=Q(n^logba);2)若f(n)=Q... 阅读全文
摘要:
1 #include "iostream" 2 #include "windows.h" 3 #include "shlwapi.h" 4 #include "iomanip" 5 #pragma comment(lib,"shlwapi.lib") 6 using namespac... 阅读全文
摘要:
1 #include "iostream" 2 using namespace std; 3 4 float MAX(float m1,float m2){ 5 if(m1>=m2) 6 return m1; 7 else 8 return m2;... 阅读全文
摘要:
1 #include "iostream" 2 #include "windows.h" 3 #include "shlwapi.h" 4 #include "iomanip" 5 #pragma comment(lib,"shlwapi.lib") 6 using namespace std;... 阅读全文
摘要:
1 #include "iostream" 2 #include "windows.h" 3 #include "cstring" 4 using namespace std; 5 6 HANDLE g_hSemThreads=INVALID_HANDLE_VALUE; 7 8 static ... 阅读全文
摘要:
1 #include "iostream" 2 #include "windows.h" 3 #include "cstring" 4 using namespace std; 5 6 7 static int g_nIndex=0; 8 const int MAX_TIMES=10; 9 s... 阅读全文
摘要:
1 #include "iostream" 2 #include "windows.h" 3 #define MAX 0x7fffffff 4 using namespace std; 5 6 void merge(int s,int q,int e,int A[]){ 7 int i,... 阅读全文
摘要:
1 #include "iostream" 2 #include "windows.h" 3 using namespace std; 4 5 class CCountUpDown{ 6 public: 7 CCountUpDown(int nAccesses): 8 m_hTh... 阅读全文
摘要:
1 #include "iostream" 2 #include "windows.h" 3 #include "cstring" 4 using namespace std; 5 6 static LPCTSTR g_szContinueEvent="w2kdg.EventDemo.event... 阅读全文
摘要:
1 #include "iostream" 2 #include "windows.h" 3 using namespace std; 4 5 class CWorkerThread{ 6 public: 7 CWorkerThread(LPCTSTR m_szName):m_szNam... 阅读全文