
stl容器
nuiniu
这个作者很懒,什么都没留下…
展开
-
牛客练习赛22-C (bitset)
链接:https://www.nowcoder.com/acm/contest/132/C 来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 一共有 n个数,第 i 个数是 xi xi 可以取 [li , ri] 中任意的一个值。 设 ,求 S 种类数。 输入描述...原创 2018-07-15 19:56:27 · 350 阅读 · 0 评论 -
Maximum Value CodeForces - 484B(区间最大余数)
题目传送门:http://codeforces.com/problemset/problem/484/B B. Maximum Value time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are giv...原创 2018-08-02 10:04:09 · 410 阅读 · 0 评论 -
模板(acm)
加权并查集: // http://poj.org/problem?id=1182 #include<stdio.h> struct node { int p; int r; }a[50005]; int find(int x) { if(x==a[x].p) return x; int t=a[x].p; a[x].p=find(t); a[x].r=(a[x]....原创 2019-03-18 16:23:46 · 213 阅读 · 0 评论 -
bfs(stl的选取)
转载自:http://www.cnblogs.com/BeyondAnyTime/archive/2012/08/10/2631191.html vector :vector和built-in数组类似,拥有一段连续的内存空间,能非常好的支持随即存取,即[]操作符,但由于它的内存空间是连续的,所以在中间进行插入和删除会造成内存块的拷贝,另外,当插入较多的元素后,预留内存空间可能不够,需要重新申请...转载 2019-04-24 20:08:15 · 251 阅读 · 0 评论