会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小白QIU
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
···
8
下一页
2022年3月26日
滑动窗口
摘要: #include <iostream>using namespace std;const int N=10010;int n,k;int a[N],q[N];int main(){ cin>>n>>k; for(int i=0;i<n;i++) cin>>a[i]; int hh=0,tt=-1;
阅读全文
posted @ 2022-03-26 09:57 小白QIU
阅读(34)
评论(1)
推荐(0)
2022年3月24日
//栈 先进后出 //队列 先进先出
摘要: #include <iostream>using namespace std;const int N=10010;int stk[N],tt;int main(){ int n; cin>>n; for(int i=0;i<n;i++) { int x; cin>>x; while(tt&&stk[
阅读全文
posted @ 2022-03-24 13:04 小白QIU
阅读(61)
评论(0)
推荐(0)
数组模拟双链表
摘要: #include <iostream>using namespace std;const int N=10010;int m;int e[N],l[N],r[N],idx;void init(){ //0表示左端点,1表示右端点 r[0]=1,l[1]=0; idx=2; }//在下标是k的点 的右
阅读全文
posted @ 2022-03-24 11:40 小白QIU
阅读(21)
评论(0)
推荐(0)
2022年3月21日
最长连续不重复子序列
摘要: #include <iostream>using namespace std;const int N=10010;int a[N],s[N];int n;int main(){ cin>>n; int res=0; for(int i=0;i<n;i++) cin>>a[i]; for(int j=
阅读全文
posted @ 2022-03-21 21:12 小白QIU
阅读(60)
评论(1)
推荐(0)
2022年3月20日
最低通行费
摘要: #include <iostream>#include <algorithm>using namespace std;const int N=10010,INF=1e9;int n;int a[N][N],f[N][N];int main(){ cin>>n; for(int i=1;i<=n;i+
阅读全文
posted @ 2022-03-20 09:11 小白QIU
阅读(74)
评论(1)
推荐(0)
2022年3月19日
摘花生
摘要: #include <iostream>#include <algorithm>using namespace std;const int N=10010,INF=1e9;int a[N][N],f[N][N];int main(){ int x; cin>>x; while(x--) { int n
阅读全文
posted @ 2022-03-19 21:48 小白QIU
阅读(106)
评论(0)
推荐(0)
2022年3月18日
耍杂技的牛
摘要: #include <iostream>#include <algorithm>using namespace std;const int N=50010;pair<int,int> cow[N];int n;int main(){ cin>>n;; for(int i=0;i<n;i++) { in
阅读全文
posted @ 2022-03-18 00:10 小白QIU
阅读(39)
评论(1)
推荐(0)
2022年3月17日
货仓选址
摘要: #include <iostream>#include <algorithm>using namespace std;const int N=10010;typedef long long LL;int a[N];int n;int main(){ cin>>n; LL res=0; for(int
阅读全文
posted @ 2022-03-17 23:11 小白QIU
阅读(25)
评论(1)
推荐(0)
排队打水
摘要: #include <iostream>#include <algorithm>using namespace std;const int N=10010;int t[N];int n;int main(){ cin>>n; for(int i=0;i<n;i++) cin>>t[i]; sort(t
阅读全文
posted @ 2022-03-17 22:24 小白QIU
阅读(10)
评论(1)
推荐(0)
合并果子
摘要: #include <iostream>#include <algorithm>#include <queue>using namespace std;int main(){ int n; cin>>n; priority_queue<int,vector<int>,greater<int> > he
阅读全文
posted @ 2022-03-17 18:27 小白QIU
阅读(40)
评论(1)
推荐(0)
上一页
1
2
3
4
5
6
···
8
下一页
公告