摘要: #include<bits/stdc++.h> using namespace std; int main(){ int a[4]; a[0]=1; a[1]=2; a[2]=3; a[3]=0; int i=3; cout<<a[i][a]; return 0; } 求输出结果( 阅读全文
posted @ 2022-07-10 15:31 计算机知识杂谈 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 拿个单调队列的题做试验: 使用STL的代码 #include<bits/stdc++.h> using namespace std; const int N=2e5+10; int n,m,x,f[N]; deque<int>q; int main(){ freopen("test.in","r", 阅读全文
posted @ 2022-07-10 13:11 计算机知识杂谈 阅读(68) 评论(0) 推荐(0) 编辑
摘要: OI界都说,STL速度很慢,很多STL内部的函数常数很大,运行速度都很不理想,很多时候都是手写数组来模拟的。 但是实际上,STL的速度并非那些人所说的那样,运行速度很慢,这篇文章就来破解掉这个谣言。 1.关于泛型 STL的库都是用泛型来写的,应该不用举例了吧: stack<int>s; deque< 阅读全文
posted @ 2022-07-10 13:09 计算机知识杂谈 阅读(352) 评论(0) 推荐(0) 编辑