- 博客(6)
- 资源 (8)
- 收藏
- 关注
原创 PAT5-08. 迷你搜索引擎
#include#include#include#include#include#include#includeusing namespace std;string line[10000];unordered_map >infile;string filename[100];unordered_map >in_line;void readfile(int fileth){
2015-02-27 18:27:52 1312
原创 pat4-06
最后一个case没过,真奇怪#include#include#includeusing namespace std;typedef vector::iterator itr;bool isbst(itr beg,itr end){ if(end-beg<=2)return true; itr mid=find_if(beg+1,end,[&](int x)->bool{ret
2015-02-26 00:53:37 322
原创 pat3-05
#include#includeusing namespace std;const int n=9999999;int val[n];int main(){ int nth,cnt=0; scanf("%d",&nth); while(scanf("%d",&val[cnt]),val[cnt]>=0) ++cnt; if(nth>cnt) printf("
2015-02-25 00:17:08 324
原创 pat2-13
#include#includeusing namespace std;int main(){ int n;scanf("%d",&n); int nth=(2*n-1)/2; vectora(n),b(n); for(auto &x:a)scanf("%d",&x); for(auto &x:b)scanf("%d",&x); int i=0,j=0; for(
2015-02-24 23:10:47 347
原创 pat2-09
#include#includeusing namespace std;int main(){ int n;cin>>n; vectorbox(n,100); int used=0; while(n--){ int weight;cin>>weight; auto it=find_if(box.begin(),box.end(),[&](in
2015-02-24 20:43:17 336
原创 pat2-06
以为是考察大数加法,用大数加法试了一下,超时了,才发现这样是绕弯路,得抄近路才行大数加法版本:#include#includeusing namespace std;typedef list num;num operator+(num a,num b){ // plus b to a if(a.size()<b.size()) a.swap(b); a.push_fr
2015-02-24 10:49:29 351
Learn Windows PowerShell 3 in a Month of Lunches, 2nd Edition.pdf
2017-01-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人