• 个人简介

    点我下载2024csp模拟赛题解https://img1.baidu.com/it/u=507332532,1865084842&fm=253&fmt=auto&app=138&f=JPEG?w=712&h=357 #include<bits/stdc++.h> using namespace std; queue a; int t[1005]; int main(){ int m,n,k=0; cin>>m>>n; for(int i=1;i<=n;i++){ int x; cin>>x; if(t[x]==0){ if(a.size()==m){ t[a.front()]=0; a.pop(); a.push(x);k++; t[x]=1; } else{ a.push(x); t[x]=1; k++; } } } cout<<k; }

  • 最近活动

  • Rating

    --
    Current Rating
    --
    Max Rating
    --
    排名
    --
    Contests