Time of Update: 2018-12-04
#include <iostream> #include <cstdio> #include <cstring> #include <queue> #include <algorithm> #include <cmath> #include <stack> #define LL long long
Time of Update: 2018-12-04
#include <iostream> #include <cstdio> #include <cstring> #include <queue> #include <algorithm> #include <cmath> #define LL long long using namespace std; const int maxm=1000*2+10; const
Time of Update: 2018-12-04
#include <iostream> #include <cstdio> #include <cstring> #include <queue> #include <algorithm> #include &
Time of Update: 2018-12-04
第一道dfs,值得紀念#include <stdio.h>const int max=5;char map[max][max];int visit[max][max];int count,k,maxn,n;int judge(int x,int y){int i,j;for(i=x,j=y-1;j>=0;j--){if(visit[i][j]==1) return 0;else if(map[i][j]=='X') break;}for(j=y,i=x-1;i>=0;i-
Time of Update: 2018-12-04
#include <iostream>#include <string>#include <cstring>#include <cstdlib>#include <cstdio>#include <cmath>#include <vector>#include <stack>#include <queue>#include <map>#include
Time of Update: 2018-12-04
/* Subject: Manacher Algorithm Author : a_clay Created Date : 2011-12-26 Sample : hdu 3068*/#include <iostream>#include <string>#include <cstring>#include <vector>#include <queue>#include
Time of Update: 2018-12-04
題目串連 題意:找出字串中所有迴文子序列的個數,最後%10007;用簡單的DP做,核心是要把每一串迴文子序列都看成一個個體, 例如:aebcdbta中 在區間[1,6]中的個體有9個:e,b,c,d,b,t,bcb,bdb,bb; 明白這個,這樣就可以dp了,所以假設在區間dp[ i] [ j ]表示區間[i ,j]中個體的個數; 假設字串S(s1,s2,.....,),在區間[i + 1,j - 1]中的個體是n個,就可以表示為s[ i ] (n) s[ j ] ;所以有dp[
Time of Update: 2018-12-04
http://acm.hdu.edu.cn/showproblem.php?pid=1024 Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 11256 Accepted Submission(s): 3701Problem DescriptionNow I think you have got
Time of Update: 2018-12-04
迴文串定義:“迴文串”是一個正讀和反讀都一樣的字串,比如“level”或者“noon”等等就是迴文串。迴文子串,顧名思義,即字串中滿足迴文性質的子串。經常有一些題目圍繞迴文子串進行討論,比如HDOJ_3068_最長迴文,求最長迴文子串的長度。樸素演算法是依次以每一個字元為中心向兩側進行擴充,顯然這個複雜度是O(N^2)的,關於字串的題目常用的演算法有KMP、尾碼數組、AC
Time of Update: 2018-12-04
最小費用,最大流的思想,也不知道怎麼稀裡糊塗就ac啦#include <iostream>#include <cstring>#include <queue>using namespace std;const int maxn=102;const int inf=2<<20;int cost[maxn][maxn],flow[maxn][maxn],cap[maxn][maxn],d[maxn];int n,m;int solve(){queue&
Time of Update: 2018-12-04
題目大意:向一個容量為V的洞中搬物品 每件物品有一個停放體積 可一個移動體積 問能否放下這些物品解題思路:對這些物品進行排序 按照順序依次進入洞中 排序要儘可能使得所有的東西都能進入洞中這是一個貪心的問題 停放體積 移動體積第一件物品 a1 b1第二件物品 a2 b2假設這兩件物品的移動體積都不大於洞的體積V那麼將單獨比較兩個物品的時候會發現 a1+b2為先放第一件物品 後放第二件物品的最大瞬時體積a2+b1為先放第二件物品
Time of Update: 2018-12-04
#include <iostream>#include <cstdio>#include <cstring>using namespace std;int dp[1001][1001];char s1[1001];char s2[1001];int get_max(int a, int b) {return a > b ? a : b;}int main() {int len1, len2, i, j;while(scanf("%s%s", s1+1,
Time of Update: 2018-12-04
#include <iostream>#include <string>#include <stack>using namespace std;const int maxn=53;int mount;stack<string> s[maxn];void stackInput();void moveCard();void finalOutput();bool isMatch(string s1,string s2);int
Time of Update: 2018-12-04
路徑類比+dfs#include <stdio.h>const int maxn=128+10;char terminal[maxn];char outcome[maxn];int n;char order[8];int amount=0;char s[8][2];char dfs(int height,int loc){if(height==n) return terminal[loc-1];int a=s[height][1]-'0';int
Time of Update: 2018-12-04
從我負責單位人力資源招聘的角度給你提出幾點建議,供你參考,1、帶多幾份簡曆前往面試,沒有比當被要求提供多一份簡曆而你卻沒有更能顯示你缺乏準備的事了。帶多幾份簡曆,面試你的人可能不止一個,預先料到這一點並準備好會顯得你做事正規、細緻。2、留心你自己的身體語言,盡量顯得精警、有活力、對主考人全神貫注。用眼神交流,在不言之中,你會展現出對對方的興趣。 3、初步印象和最後印象。最初和最後的五分鐘是面試中最關鍵的,在這段時間裡決定了你留給人的第一印象和臨別印象以及主考人是否欣賞你。最初的五分鐘內應當主動溝
Time of Update: 2018-12-04
CMenu::LoadMenu 載入一個菜單資源,並將其串連到CMenu對象上BOOL LoadMenu(LPCTSTR lpszResourceName);BOOL LoadMenu(UINT nIDResource);參數:lpszResourceName 指向一個以NULL結尾的字串,其中包含要載入的菜單資源名;nIDResource
Time of Update: 2018-12-04
Verdis QuoTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 282 Accepted Submission(s): 212Problem DescriptionThe Romans used letters from their Latin alphabet to represent each of the seven
Time of Update: 2018-12-04
#include <iostream>#include <cstdio>#include <cstring>#include <vector>#include <string>#include <algorithm>using namespace std;const int N = 50005;int n, T, k;int B[N];int Lowbit(int x) { return x &
Time of Update: 2018-12-04
參考http://blog.csdn.net/guo_love_peng/article/details/6624014http://blog.csdn.net/rattles/article/details/5510919sort函數可以傳兩個參數或三個參數。第一個參數是要排序的區間首地址,第二個參數是區間尾地址的下一地址。也就是說,排序的區間是 [a,b) 。簡單來說,有一個數組 int a[100] ,要對從 a[0] 到 a[99] 的元素進行排序,只要寫 sort(a,a+100)
Time of Update: 2018-12-04
#include <iostream>#include <string>#include <cstring>#include <cstdlib>#include <cstdio>#include <cmath>#include <vector>#include <stack>#include <deque>#include <queue>#include <bitset&