1 条题解

  • 0
    @ 2026-7-11 20:31:35

    欸,牢C有一个有意思的解法 """ #include<bits/stdc++.h> using namespace std; #define int long long

    signed main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int lo,t; cin>>lo>>t; int ans=t; vectorc(1001,0); for(int i=1;i<=t;i++){ int a; cin>>a; if(i-c[a]<lo&&c[a]!=0){ ans--; } c[a]=i; } cout<<ans; return 0; } """

    信息

    ID
    53
    时间
    1000ms
    内存
    128MiB
    难度
    7
    标签
    递交数
    48
    已通过
    11
    上传者