浮躁的心,幹不成一件事

    欲速則不達。有時候想急於做好一件事,反而越做不好事情。雖然興趣在這過程中發揮著非常重要的作用,但因為功力還遠沒達到那樣的水平,最終還是會失敗。    在朋友的部落格上,看到他寫的一句話:這輩子,我就會兩件事:這也不會;那也不會。是啊,我會什麼呀?我啥也不會。    有時候,明明知道是錯的,卻還要裝逼,擺出一副“我掌握的就是真理”的架勢,以為這樣才能在別人面前樹立威信,證明自己比別人強。其實效果剛好相反。   

pku acm 1068

//括弧匹配問題#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 <

pku acm 1012

#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 <

一些機器視覺網站

Computer Vision  Computer Vision Homepage, Carnegie Mellon Universitywww.cs.cmu.edu/~cil/vision.html  Annotated Computer Vision

pku acm 1019

#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(

通用工具Utilities(三)—-定義於utility中的pair和輔助性的比較操作符

// 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

pku acm 1032

有兩種方法求解,(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]

pku acm 1010

參考了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. 對解的評價,採用了一個計算公式,省去了較複雜的條件判斷。--這個比較好     評價分數 =

pku acm 1007

#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 =

pku acm 1023

#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;

指向類的資料成員和函數指標

 指向類成員的指標在C++語言中,可以定義一個指標,使其指向類成員或成員函數,然後通過指標來訪問類的成員。這包括指向屬性成員的指標和指向成員函數的指標。à 指向資料成員的指標在C++語言中,可以定義一個指標,使其指向類成員。當屬性成員為靜態和非靜態時,指標的使用也有不同。其中,指向非待用資料成員的指標定義格式如下:1.    <資料類型> <類名>::*<指標名> [ =

pku+acm+1011

搜尋類的題目,參考自: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

pku acm 1065

//貪心演算法 #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 >

pku acm 1077

非常經典的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'

字元特性char_traits定義,及其特化版本char_traits,char_traits

// 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 /*

通過使用類型庫提高VB調用DLL函數的效能

  本文始發於水木清華BBS(smth.org),轉載請保留有關資訊,謝謝! 通過使用類型庫提高VB調用DLL函數的效能RoachCock@smth mailto:chen3feng@163.com, chen3fengx@163.com, chen3fengx@hotmail.com   VB雖然是個很好玩的東西,但是自身功能有限,限制了VB在某些方面的應用. MS提供了兩種兩種方式來增強VB的功能,一種是調用COM組件,另一種就是調用Dll函數  

cstdarg可變參數列表

文章目錄 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

用 LD_PRELOAD 挽救被誤刪的 libc.so.6

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.

Operator new函數

文章目錄 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

在VBS中使用事件

發信人: RoachCock (chen3feng), 信區: Programming 標  題: 在VBS中使用事件 發信站: BBS 水木清華站 (Thu Jun 13 18:55:43 2002)   VBS是一種功能強大的語言,這個從各種巨集病毒的泛濫可以看得出,VBS功能強大不是語言 本身,而是它具有調用自動化COM組件的能力,而且,在VBS中還可以使用事件 VBS提供了一個GetRef函數,VBS手冊上說是返回一個函數指標,我調試的結果,是返回一個

總頁數: 61357 1 .... 26284 26285 26286 26287 26288 .... 61357 Go to: 前往

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.