05 2016 档案

摘要:#include #include #include using namespace std; seta; int main() { int n,m,i,j,k; scanf("%d%d",&n,&m); for(i=1;i<=n;i++) { int x; scanf("%d",&x); a.insert(x); ... 阅读全文
posted @ 2016-05-08 14:13 岂是蓬蒿人 阅读(134) 评论(0) 推荐(0)
摘要:/* set用法 */ #include #include #include using namespace std; seta; set::iterator it; int main() { int n,i,j,k; for(i=1;i<=10;i++) a.insert(i*5); printf("%d\n",a.count(5));//count() 返回某... 阅读全文
posted @ 2016-05-08 09:35 岂是蓬蒿人 阅读(239) 评论(0) 推荐(1)
摘要:/* STL */ #include #include #include using namespace std; mapa; int main() { int n,m,i,j,k; scanf("%d%d",&n,&m); for(i=1;i<=n;i++) { int s; scanf("%d",&s); a[s... 阅读全文
posted @ 2016-05-08 09:02 岂是蓬蒿人 阅读(105) 评论(0) 推荐(0)
摘要:#include #include #include #define maxn 300100 #define maxx 1010 using namespace std; char s[maxx]; struct node { int next[30]; bool w; }tree[maxn]; int tot; void add() { int l=strlen(s),... 阅读全文
posted @ 2016-05-08 08:08 岂是蓬蒿人 阅读(154) 评论(0) 推荐(0)
摘要:/* STL */ #include #include #include #include using namespace std; mapa; int main() { int n,m,i,j,k; cin>>n; for(i=1;i>s; for(j=0;j>s; if(a[s]==1) printf("YES\n");... 阅读全文
posted @ 2016-05-07 17:16 岂是蓬蒿人 阅读(143) 评论(0) 推荐(1)
摘要:#include #include using namespace std; int a[100001],tot; struct node { int l,r; int ll,rr; int sum; }tree[200001]; void build(int l,int r) { int k=++tot; tree[k].l=l; tree[k]... 阅读全文
posted @ 2016-05-07 15:18 岂是蓬蒿人 阅读(160) 评论(0) 推荐(0)