南大18本地夏令營題目

2021-08-21 15:45:49 字數 852 閱讀 8375

題目如下:

第乙個題目,題解:需要好好考慮前序和後續的性質,考慮樹鏈:

#include#include#include#includeusing namespace std ;

#define max 1005

int pre[max];

int aft[max];

int stk[max];

int n ;

int main()

for(int j = 0 ; j < n ; j ++)

int mx = 1 , top = 0, low = 0;

for(int i = 0 ; i < n ; i ++ )

}cout << mx 第二個題目,問了一波大佬,又說用vector的,又說map的,肯定不能直接建圖,那麼我們就這麼解決:感謝大佬支援

#include#include#include#includeusing namespace std ;

char str[6];

mapdistances , exist;

long long starts, endss ;

long long encode(char *str)

return ans ;

}void decode(char* str ,long long data)

}void bfs();

int main()

}tmp[i] = org;}}

}

最後乙個題目,就不寫了01揹包,沒什麼意思

git學習三(本地分支)

1 git commit 提交三個檔案物件以後的git倉庫物件 git 倉庫中有五個物件 三個表示檔案快照內容的 blob 物件 乙個記錄著目錄樹內容及其中各個檔案對應 blob 物件索引的 tree 物件 以及乙個包含指向 tree 物件 根目錄 的索引和其他提交資訊元資料的 commit 物件。...

iOS 10本地推送

ios 10本地推送 end ios 10 使用以下方法註冊,才能得到授權 center requestauthorizationwithoptions unauthorizationoptionalert unauthorizationoptionsound completionhandler b...

HUE3 10本地安裝

hue安裝的方式基本有三種,cdh中整合 直接在cm server中新增該服務即可 docker中快速體驗,見使用docker安裝hue 本地手動安裝,需要自己配置,比較麻煩,但可以嘗試最新版,並且比較穩定。下面是本地安裝後的首頁截圖。配置檔案位於desktop conf pseudo distri...