摘要: #include #include #include #include using namespace std; inline char gc() { static char buf[1 << 18], *fs, *ft; return (fs == ft && (ft = (fs = buf) + fread(buf, 1, 1 << 18, stdin)), fs ... 阅读全文
posted @ 2017-10-01 17:18 TimDucan 阅读(119) 评论(0) 推荐(0) 编辑
摘要: syzoj.com 最短路径问题 #include #include #include #include #include #include using namespace std; vectora[100001],b[100001]; queuebfs; int dis[100001]; int main(){ memset(dis,127,sizeof(dis)); di... 阅读全文
posted @ 2017-10-01 15:20 TimDucan 阅读(128) 评论(0) 推荐(0) 编辑
摘要: vector 的用法 1.vector定义了动态的不确定大小的数组 2.用法的操作很像队列的stl操作 3.vectora 定义了一个不确定大小的一维数组a 之后的具体操作: (1)a.push_back(x):相当于在a数组最后一个位置压入一个元素x,并且在开辟一个空间 eg:a.push_back(1) 则 a[0]=1; 继续 ... 阅读全文
posted @ 2017-10-01 15:01 TimDucan 阅读(281) 评论(0) 推荐(0) 编辑