Time of Update: 2018-12-05
欲速則不達。有時候想急於做好一件事,反而越做不好事情。雖然興趣在這過程中發揮著非常重要的作用,但因為功力還遠沒達到那樣的水平,最終還是會失敗。 在朋友的部落格上,看到他寫的一句話:這輩子,我就會兩件事:這也不會;那也不會。是啊,我會什麼呀?我啥也不會。 有時候,明明知道是錯的,卻還要裝逼,擺出一副“我掌握的就是真理”的架勢,以為這樣才能在別人面前樹立威信,證明自己比別人強。其實效果剛好相反。
Time of Update: 2018-12-05
//括弧匹配問題#include <iostream>#include <cstdio>using namespace std;int pseq[22];//接收輸入p-sequenceint harr[22];//輔助數組,統計pseq[i-1]和pseq[i]之間還有多少個'('沒有匹配int wseq[22];//結果w-sequenceint count;int main(){freopen("in.txt","r",stdin);int t; // 1 <
Time of Update: 2018-12-05
#include <iostream>#include <cstdio>#include <vector>#include <algorithm>#include <functional>#include <map>using namespace std;int joseph_m(int k){vector<int> vint,vint_b;int i,j,m;int boys;for(i = 0; i <
Time of Update: 2018-12-05
Computer Vision Computer Vision Homepage, Carnegie Mellon Universitywww.cs.cmu.edu/~cil/vision.html Annotated Computer Vision
Time of Update: 2018-12-05
#include <iostream>#include <cstdio>#include <string>#include <algorithm>#include <deque>#include <limits>#include <cmath>using namespace std;//求10進位正整數k的位元,如123為3位int nobits(int k){int count = 0,t = k;while(
Time of Update: 2018-12-05
// utility standard header#pragma once#ifndef _UTILITY_#define _UTILITY_#ifndef RC_INVOKED#include <iosfwd>#ifdef _MSC_VER #pragma pack(push,_CRT_PACKING)//#pragma pack(push, n)先將當前位元組對齊值壓入編譯棧棧頂, 然後再將 n 設為當前值. #pragma
Time of Update: 2018-12-05
有兩種方法求解,(1)遞迴分解,這種方法很好想,但是逾時(2)分析題目,得出一些基本規律。(參考了他人的想法)1, a[1] > 1Proof: If a[1] = 1, a[t] could be replacedby a[t] + 1 and a[t]+1 > a[t] * 1. 2, 1 <= a[i+1] – a[i] <= 2Proof: If exists i make a[i+1] – a[i] >2, then a[i], a[i+1]
Time of Update: 2018-12-05
參考了http://blog.csdn.net/huxin2007/article/details/6766074的文章。類似於究舉法。主要思路:1. 先對輸入按面值的從小到大排序,這對剪枝有協助,比如: 輸入面值:1,2,3,4,5 顧客要求是 3 假如計算到分支 1,1,2 的時候,超過 3 了,後面的 1,1,3 ; 1,1,4 ; 1,1,5 都不需要計算了2. 對解的評價,採用了一個計算公式,省去了較複雜的條件判斷。--這個比較好 評價分數 =
Time of Update: 2018-12-05
#include <iostream>#include <cstdio>#include <string>#include <map>using namespace std;int numOutOfOrder(string s){if(s.length() == 0)return 0;int sum = 0,count = 0;int i,j;for(i = 0; i < s.length(); i++){count = 0;for(j =
Time of Update: 2018-12-05
#include <iostream>#include <cstdio>#include <string>#include <limits>#include <cmath>#include <algorithm>using namespace std;class Funk{public:typedef long long LL;typedef unsigned long long ULL;private:int nbits;
Time of Update: 2018-12-05
指向類成員的指標在C++語言中,可以定義一個指標,使其指向類成員或成員函數,然後通過指標來訪問類的成員。這包括指向屬性成員的指標和指向成員函數的指標。à 指向資料成員的指標在C++語言中,可以定義一個指標,使其指向類成員。當屬性成員為靜態和非靜態時,指標的使用也有不同。其中,指向非待用資料成員的指標定義格式如下:1. <資料類型> <類名>::*<指標名> [ =
Time of Update: 2018-12-05
搜尋類的題目,參考自:http://hi.baidu.com/alpc29_33/blog/item/43205f10c41dc377ca80c488.html糾結了N天的一道題。#include <iostream>#include <cstring>#include <algorithm>#include <functional>using namespace std;int parts[65];int used[65];int
Time of Update: 2018-12-05
//貪心演算法 #include <iostream>#include <cstdio>#include <list>#include <algorithm>using namespace std;typedef pair<int,int> PINTINT;bool cmp1(PINTINT p1, PINTINT p2){if (p1.first < p2.first)return true;if (p1.first >
Time of Update: 2018-12-05
非常經典的8數位問題,主要採用的演算法是人工智慧中的“有序搜尋演算法”,也有人稱之為A演算法。#include <iostream>#include <cstdio>#include <algorithm>#include <set>#include <string>using namespace std;const int LEN = 9;struct PStatus{string pos;//位置資訊int index;//'x'
Time of Update: 2018-12-05
// iosfwd standard header#if _MSC_VER > 1000#pragma once#endif#ifndef _IOSFWD_#define _IOSFWD_#include <cstdio>#include <cstring>#include <cwchar>#include <xstddef>#ifdef _MSC_VER#pragma pack(push,8)#endif /*
Time of Update: 2018-12-05
本文始發於水木清華BBS(smth.org),轉載請保留有關資訊,謝謝! 通過使用類型庫提高VB調用DLL函數的效能RoachCock@smth mailto:chen3feng@163.com, chen3fengx@163.com, chen3fengx@hotmail.com VB雖然是個很好玩的東西,但是自身功能有限,限制了VB在某些方面的應用. MS提供了兩種兩種方式來增強VB的功能,一種是調用COM組件,另一種就是調用Dll函數
Time of Update: 2018-12-05
文章目錄 Parameters va_listType to holdinformation about variable argumentsThis type is used as a parameter for the macros definedin cstdarg to retrieve the additional arguments of a
Time of Update: 2018-12-05
c({'fm':'as','F':'779717E8','F1':'9D73F1E4','F2':'4CA6BE6B','F3':'54E5243D','T':'1277790691','title':this.innerHTML,'url':this.href,'p1':3,'y':'774F7FBA'})" href="http://edu.codepub.com/2009/0704/8267.php" target="_blank">用 LD_PRELOAD 挽救被誤刪的 libc.so.
Time of Update: 2018-12-05
文章目錄 ParametersReturn value operator newvoid* operator new (std::size_t size) throw (std::bad_alloc);void* operator new (std::size_t size, const std::nothrow_t& nothrow_constant) throw();void* operator new
Time of Update: 2018-12-05
發信人: RoachCock (chen3feng), 信區: Programming 標 題: 在VBS中使用事件 發信站: BBS 水木清華站 (Thu Jun 13 18:55:43 2002) VBS是一種功能強大的語言,這個從各種巨集病毒的泛濫可以看得出,VBS功能強大不是語言 本身,而是它具有調用自動化COM組件的能力,而且,在VBS中還可以使用事件 VBS提供了一個GetRef函數,VBS手冊上說是返回一個函數指標,我調試的結果,是返回一個