建议撤下第一个题解

P2032 扫描

@[Alex__Wei](/user/220470)
by noi123456 @ 2023-02-09 14:37:51


是AC啊 ![](https://cdn.luogu.com.cn/upload/image_hosting/8nq2i0im.png)
by CodingOIer @ 2023-02-09 14:47:51


~~人还 at 错了~~
by Night_sea_64 @ 2023-02-09 14:50:25


@[noi123456](/user/776334) 你语言没使用对吧
by Night_sea_64 @ 2023-02-09 14:51:26


公开一下[楼主代码](https://www.luogu.com.cn/record/101761052): ```cpp //Why line14 "bac"? #include<bits/stdc++.h> using namespace std; const int N=1000005; int n,k; struct node{ int v,id; }a[N]; deque<node> qmin,qmax; int main(){ cin>>n>>k; for(int i=1;i<=n;i++)cin>>a[i].v,a[i].id=i; for(int i=1;i<=n;i++){ while(!qmax.empty()&&qmax.bac).v<=a[i].v){ qmax.pop_back(); } qmax.push_back(a[i]); if(qmax.front().id==i-k)qmax.k(pop_front(); if(i>=k)cout<<qmax.front().v<<endl; } return 0; } ```
by olegekei @ 2023-02-09 15:10:41


6,~~诬陷是吧~~ 第一篇题解: ```cpp #include<bits/stdc++.h> using namespace std; const int N=1000005; int n,k; struct node{int v,id;}a[N]; deque<node> qmin,qmax; int main() { cin>>n>>k; for(int i=1;i<=n;i++)cin>>a[i].v,a[i].id=i; for(int i=1;i<=n;i++) { while(!qmax.empty()&&qmax.back().v<=a[i].v)qmax.pop_back(); qmax.push_back(a[i]); if(qmax.front().id==i-k)qmax.pop_front(); if(i>=k)cout<<qmax.front().v<<endl; } return 0; } ``` 作者是这位:@[枫楠](/user/221610)
by Black_tee @ 2023-02-09 15:21:24


@[noi123456](/user/776334) 老哥你是来搞笑的吗,lmao
by Hughpig @ 2023-02-09 15:24:03


草哈哈哈哈哈,这啥啊。
by Moon_Traveller @ 2023-02-09 15:30:56


lmao
by CSPJ10pts @ 2023-02-09 15:52:04


破案了,密码过于简单而被JC,晚上我改一下密码(
by __longtian0210__ @ 2023-02-09 17:17:05


|