| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 180665 | C班詹皓杰 | 密钥 | C++ | Accepted | 100 | 954 MS | 256 KB | 402 | 2024-08-21 17:15:53 |
#include<iostream> #include<queue> using namespace std; struct Node{ int ind,v; }t; deque<Node> q; int main(){ int n,m; cin>>n>>m; for(int T = 1; T <= n; T++){ cin>>t.v; t.ind = T; while(!q.empty() && t.v>=q.back().v){ q.pop_back(); } q.push_back(t); if(T-q.front().ind >= m){ q.pop_front(); } if(T >= m){ cout<<q.front().v; } } return 0; }