CSP-J 2026 SC 迷惑行为大赏!🤓👆

· · 休闲·娱乐

:::info[声明]{open} 本文由 人类 生成! :::

不会写前言。不过看到我们大 SC 江山辈有神人出,老身就放心了😋

话不多说直接开赤吧😋😋😋

欢迎在 11.21 之前向我私信投稿统计遗漏的迷惑行为,我会在 11.21 再更新一次的!

也可以联系我撤下,不过要证明这是你才行。

可以点个赞吗/kel/kel/kel,谢谢喵!!!

广告:来催 @WJX114514 女装,

一些统计

本次 CSP-J SC 共有 2237 名考生,他们提交了 8478 份代码,其中 T1 有 2218 份,T2 有 2200 份,T3 有 2112 份,T4 有 1948 份。🤔

所有代码里出现了 327 次 //freopen,似乎大部分都在诈骗我,没有使得代码的文件读写爆炸,看来大家的反保龄意识十分强大!!1

还有 24 个 freopen("xxx.in","w",stdin),【】

此外,rp 子串出现了 228 次,AFO 子串出现了 \color{red}1 次,inline 子串出现了 153 次,fread 子串出现了 34 次。

最大的文件夹

SC-J01405,TA 在 T3 末尾派放了数百架喷气式飞机:

:::info[代码]

SC-J01405\and\and.cpp
                        ____________
                       //          / ---------------------(省略一堆减号)
                      //      ____/
                     //      /   / 
                    //      /   /
        ___        //      /___/
       /  /       //___       /
  ____/  /_______//|   |   |  |======================(省略一堆等于号)
 <_++++   _______  |   |   |   |=======================(省略一堆等于号)
      \  \       \\|___|   |  |======================(省略一堆等于号)
       \__\       \\      ____\
                   \\     \    \
                    \\     \    \
                     \\     \____\
                      \\          \
                       \\__________\ ---------------------(省略一堆减号)
(省略一堆空行和一堆相同的飞机)

:::

最小的文件夹

SC-J01182,这是 TA 的全部代码:

:::info[代码]

SC-J01182\travel\travel.cpp

#include<bits/stdc++.h>
using namespace std;
int mian()
{
    //freopen("travel1.in","r",stdin);
    //freopen("travel1.out","w",stdout);
SC-J01182\string\string.cpp

#include<bits/stdc++.h>
using namespace std;
int main()
{

    return 0;
 } 

::: 来年再战!

出现的唯一一个 AFO 子串

SC-J00087\card\card.cpp

...
/*

T3T4都不会
没有1=的话就要AFO了
再见了OI
希望部分分能多一点吧

*/

祝你 1=。

大哥上楼梯

SC-J02226 秘制代码:

:::info[代码]

SC-J02226\and\and.cpp

#include<bits/stdc++.h>
using namespace std;
int n,m,a[100005],maxx,maxxx,pop,ppp,b[100005],pip;
int main(){
    freopen("and.in","r",stdin);
    freopen("and.out","w",stdout);
    cin>>n>>m;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        if(a[i]!=i-1){
            pop=1;
        }
        if(a[i]>4) ppp=1;
        if((a[i]+1)/2==1&&a[i]!=0) pip=1;
    }
    if(pop==0&&n>=2000){
        cout<<n/2-1;
        return 0;
    }
    if(pip==0&&n>=2000){
        sort(a+1,a+1+n);
        cout<<a[n-m+1];
        return 0;
    }
    if(n>2000&&ppp==0){
        for(int i=1;i<=n;i++){
            if(a[i]==4) b[4]++;
            if(a[i]==3) b[3]++;
            if(a[i]==2) b[2]++;
            if(a[i]==1) b[1]++;
        }
        if(b[4]>=m){
            cout<<4;
            return 0;
        }
        else if(b[3]>=m){
            cout<<3;
            return 0;
        }
        else if(b[3]+b[2]>=m){
            cout<<2;
            return 0;
        }
        else if(b[3]+b[1]>=m){
            cout<<1;
        }
        else{
            cout<<0;
        }
    }
    if(m==n){
        for(int i=1;i<=n;i++){
            maxx=maxx&a[i];
        }
        cout<<maxx;
        return 0;
    }
    if(m==n-1){
        for(int i=1;i<=n;i++){
            for(int l=1;l<=n;l++){
                if(l!=i){
                    maxxx=a[l];
                    break;
                }
            }
            for(int o=1;o<=n;o++){
                if(o==i) continue;
                maxxx&=a[o]; 
            }
            maxx=max(maxx,maxxx);
        }
        cout<<maxx;
        return 0;
    }
    /*if(m==n-2){
        for(int i=1;i<=n;i++){
            for(int o=i+1;o<=n;o++){
                for(int l=1;l<=n;l++){
                    if(l!=i&&l!=o){
                        maxxx=a[l];
                        break;
                    }
                }
                for(int p=1;p<=n;p++){
                    if(p==i||p==o) continue;
                    maxxx&=a[p]; 
                }
            }
            maxx=max(maxx,maxxx);
        }
        cout<<maxx;
        return 0;
    }
    if(m==n-3){
        for(int i=1;i<=n;i++){
            for(int o=i+1;o<=n;o++){
                for(int y=o+1;y<=n;y++){
                    for(int l=1;l<=n;l++){
                        if(l!=i&&l!=o&&l!=y){
                            maxxx=a[l];
                            break;
                        }
                    }
                    for(int p=1;p<=n;p++){
                        if(p==i||p==o||p==y) continue;
                        maxxx&=a[p]; 
                    }
                    maxx=max(maxx,maxxx);
                }

            }

        }
        cout<<maxx;
        return 0;
    }*/
    if(m==1){
        for(int i=1;i<=n;i++){
            maxx=max(maxx,a[i]);
        }
        cout<<maxx;
        return 0;
    }
    if(m==2){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                maxx=max(maxx,a[i]&a[j]);
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==3){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    maxx=max(maxx,a[i]&a[j]&a[k]);
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==4){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        maxx=max(maxx,a[i]&a[j]&a[k]&a[l]);
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==5){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]);
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==6){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]);
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==7){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]);
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==8){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==9){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]);
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==10){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]);
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==11){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                for(int bb=pppppp+1;bb<=n;bb++){
                                                    maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]);
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==12){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                for(int bb=pppppp+1;bb<=n;bb++){
                                                    for(int bbb=bb+1;bbb<=n;bbb++){
                                                        maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]);
                                                    }   
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==13){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                for(int bb=pppppp+1;bb<=n;bb++){
                                                    for(int bbb=bb+1;bbb<=n;bbb++){
                                                        for(int bbbb=bbb+1;bbbb<=n;bbbb++){
                                                            maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]);
                                                        }
                                                    }   
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==14){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                for(int bb=pppppp+1;bb<=n;bb++){
                                                    for(int bbb=bb+1;bbb<=n;bbb++){
                                                        for(int bbbb=bbb+1;bbbb<=n;bbbb++){
                                                            for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
                                                                maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]);
                                                            }
                                                        }
                                                    }   
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==15){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                for(int bb=pppppp+1;bb<=n;bb++){
                                                    for(int bbb=bb+1;bbb<=n;bbb++){
                                                        for(int bbbb=bbb+1;bbbb<=n;bbbb++){
                                                            for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
                                                                for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
                                                                    maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]);
                                                                }
                                                            }
                                                        }
                                                    }   
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==16){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                for(int bb=pppppp+1;bb<=n;bb++){
                                                    for(int bbb=bb+1;bbb<=n;bbb++){
                                                        for(int bbbb=bbb+1;bbbb<=n;bbbb++){
                                                            for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
                                                                for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
                                                                    for(int ii=bbbbbb+1;ii<=n;ii++){
                                                                        maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]&a[ii]);
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }   
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==17){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                for(int bb=pppppp+1;bb<=n;bb++){
                                                    for(int bbb=bb+1;bbb<=n;bbb++){
                                                        for(int bbbb=bbb+1;bbbb<=n;bbbb++){
                                                            for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
                                                                for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
                                                                    for(int ii=bbbbbb+1;ii<=n;ii++){
                                                                        for(int iii=ii+1;iii<=n;iii++){
                                                                            maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]&a[ii]&a[iii]);
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }   
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==18){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                for(int bb=pppppp+1;bb<=n;bb++){
                                                    for(int bbb=bb+1;bbb<=n;bbb++){
                                                        for(int bbbb=bbb+1;bbbb<=n;bbbb++){
                                                            for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
                                                                for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
                                                                    for(int ii=bbbbbb+1;ii<=n;ii++){
                                                                        for(int iii=ii+1;iii<=n;iii++){
                                                                            for(int iiii=iii+1;iiii<=n;iiii++){
                                                                                maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]&a[ii]&a[iii]&a[iiii]);
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }   
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    if(m==19){
        for(int i=1;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    for(int l=k+1;l<=n;l++){
                        for(int p=l+1;p<=n;p++){
                            for(int pp=p+1;pp<=n;pp++){
                                for(int ppp=pp+1;ppp<=n;ppp++){
                                    for(int pppp=ppp+1;pppp<=n;pppp++){
                                        for(int ppppp=pppp+1;ppppp<=n;ppppp++){
                                            for(int pppppp=ppppp+1;pppppp<=n;pppppp++){
                                                for(int bb=pppppp+1;bb<=n;bb++){
                                                    for(int bbb=bb+1;bbb<=n;bbb++){
                                                        for(int bbbb=bbb+1;bbbb<=n;bbbb++){
                                                            for(int bbbbb=bbbb+1;bbbbb<=n;bbbbb++){
                                                                for(int bbbbbb=bbbbb+1;bbbbbb<=n;bbbbbb++){
                                                                    for(int ii=bbbbbb+1;ii<=n;ii++){
                                                                        for(int iii=ii+1;iii<=n;iii++){
                                                                            for(int iiii=iii+1;iiii<=n;iiii++){
                                                                                for(int iiiii=iiii+1;iiiii<=n;iiiii++){
                                                                                    maxx=max(maxx,a[i]&a[j]&a[k]&a[l]&a[p]&a[pp]&a[ppp]&a[pppp]&a[ppppp]&a[pppppp]&a[bb]&a[bbb]&a[bbbb]&a[bbbbb]&a[bbbbbb]&a[ii]&a[iii]&a[iiii]&a[iiiii]);
                                                                                }
                                                                            }
                                                                        }
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }   
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        cout<<maxx;
        return 0;
    }
    return 0;
} 

:::

for 的恩情还不完 \&#x1F62D;/

&#x2B50;这里是炸鱼的整活大神

太牛了,所以我要全文放出。

(注意:顺序对应没有错误。)

:::info[代码]

SC-J02089\travel\travel.cpp

#include<bits/stdc++.h>
using namespace std;
int n,m,a[200010];
signed main() {
    ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 
//  freopen("and.in","r",stdin);
//  freopen("and.out","w",stdout);
    cin>>n>>m;
    for(int i=1;i<=n;i++) cin>>a[i];
    int ans=0;
    for(int k=30;k>=0;k--){
        int cnt=0;
        for(int i=1;i<=n;i++) if((((a[i]>>k)<<k)&(ans|(1<<k)))==(ans|(1<<k))) cnt++;
        if(cnt>=m) ans|=(1<<k);
    }
    cout<<ans;
    while(true);
    return 0;
}  
// T3 一秒钟就会了 
// 8:46 写完 

// 反正我不会这题,交个 while(true) 吧 

// 乱写点东西吧,今年 T4 太简单,太短,太水了哈哈哈哈 
// 我要向看到这份代码的表白 
// 我喜欢你 
// 昨天是我的生日,可以祝我生日快乐吗 

// 8:59 AK

// AK 代码纯享版,由豆包 AI 生成 

//#include<bits/stdc++.h>
//using namespace std;
//signed main() {
//  ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 
//  freopen("travel.in","r",stdin);
//  freopen("travel.out","w",stdout);
//  string a,b,c,d;
//  cin>>a>>b>>c>>d;
//  cout<<(a==c);
//  cout<<(a==c && b[0]==d[0] && b[1]==d[1]);
//  cout<<(a==c && b[0]==d[0] && b[1]==d[1] && (b[2]<='C')==(d[2]<='C'));
//  cout<<(a==c && b[0]==d[0] && b[1]==d[1] && (b[2]<='C')==(d[2]<='C') && abs(b[2]-d[2])==1);
//  return 0;
//}

//#include<bits/stdc++.h>
//using namespace std;
//#define int long long
//int n,s[200010];
//char ch[200010];
//inline int ask(int x){
//  int y=s[n]-x+1;
//  int T=lower_bound(s+1,s+n+1,x)-s;
//  int P=lower_bound(s+1,s+n+1,y)-s;
//  return ch[T]!=ch[P];
//}
//signed main() {
//  ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 
//  freopen("string.in","r",stdin);
//  freopen("string.out","w",stdout);
//  cin>>n;
//  for(int i=1;i<=n;i++) cin>>s[i]>>ch[i],s[i]+=s[i-1];
//  vector<int>T;
//  T.push_back(0);
//  for(int i=1;i<=n;i++){
//      if(s[i]<=(s[n]>>1)) T.push_back(s[i]);
//      if(s[n]-s[i-1]<=(s[n]>>1)) T.push_back(s[n]-s[i-1]);
//  }
//  sort(T.begin(),T.end());
//  int ans=0;
//  for(int i=1;i<T.size();i++) ans+=(T[i]-T[i-1])*ask(T[i]);
//  cout<<ans;
//  return 0;
//}

//#include<bits/stdc++.h>
//using namespace std;
//int n,m,a[200010];
//signed main() {
//  ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 
//  freopen("and.in","r",stdin);
//  freopen("and.out","w",stdout);
//  cin>>n>>m;
//  for(int i=1;i<=n;i++) cin>>a[i];
//  int ans=0;
//  for(int k=30;k>=0;k--){
//      int cnt=0;
//      for(int i=1;i<=n;i++) if((((a[i]>>k)<<k)&(ans|(1<<k)))==(ans|(1<<k))) cnt++;
//      if(cnt>=m) ans|=(1<<k);
//  }
//  cout<<ans;
//  return 0;
//}

//#include<bits/stdc++.h>
//using namespace std;
//#define int long long
//int n,m,a[500010],pos[500010],cnt[500010],ans[500010];
//signed main() {
//  ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 
//  freopen("card.in","r",stdin);
//  freopen("card.out","w",stdout);
//  cin>>n>>m;
//  for(int i=1;i<=n;i++) cin>>a[i],pos[a[i]]=max(pos[a[i]],i),cnt[i]=1;
//  for(int i=1;i<=n;i++) cnt[pos[a[i]]+1]+=cnt[i];
//  for(int i=1;i<=n;i++) ans[a[i]]+=cnt[i];
//  for(int i=1;i<=m;i++) cout<<ans[i]<<" ";
//  return 0;
//} 
SC-J02089\string\string.cpp

#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,s[200010];
char ch[200010];
inline int ask(int x){
    int y=s[n]-x+1;
    int T=lower_bound(s+1,s+n+1,x)-s;
    int P=lower_bound(s+1,s+n+1,y)-s;
    return ch[T]!=ch[P];
}
//bitset<10>TNT;
signed main() {
    ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 
    freopen("string.in","r",stdin);
    freopen("string.out","w",stdout);
    cin>>n;
    int mxa=0;
    for(int i=1;i<=n;i++) cin>>s[i]>>ch[i],mxa=max(mxa,s[i]),s[i]+=s[i-1];
    if(!((2000<n && n<=200000 && mxa==1) || (n<=10 && mxa<=50))){
        puts("songxr 老师,我还记得你");
//      TNT[1]=1;
//      cout<<TNT._M_w[0]; 这玩意会 CE 
        return 0;
    }
    vector<int>T;
    T.push_back(0);
    for(int i=1;i<=n;i++){
        if(s[i]<=(s[n]>>1)) T.push_back(s[i]);
        if(s[n]-s[i-1]<=(s[n]>>1)) T.push_back(s[n]-s[i-1]);
    }
    sort(T.begin(),T.end());
    int ans=0;
    for(int i=1;i<T.size();i++) ans+=(T[i]-T[i-1])*ask(T[i]);
    cout<<ans;
    return 0;
}
//T2 也是简单题,难于 T3 T4 
//8:56 写完 

// 应该是机器评测,所以没人看的到我的代码 
// DeepSeek 需要手机验证了,登不了了 
// 昨天晚上豆包告诉我,freopen 需要注释,所以我在 T3 注释着试一试 
// 我再特判一下部分分防止正解写错 
// 应该没什么问题了 

// 现在豆包又说我的代码没有 a 数组,所以绝对是错的,我该怎么办啊,a 这个字符怎么打啊 
// 代码没有用小驼峰命名法 

// 下午 -S 还是很慌啊,不知道还能不能把豆包带进考场 
// 不管了,干了 
SC-J02089\and\and.cpp

#include<bits/stdc++.h>
using namespace std;
mt19937 rnd(time(0));
signed main() {
    ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 
    freopen("travel.in","r",stdin);
    freopen("travel.out","w",stdout);
    string a,b,c,d;
    cin>>a>>b>>c>>d;
    cout<<rnd()%2<<rnd()%2<<rnd()%2<<rnd()%2;
    //我常常追忆过去,后面忘了 
//  cout<<(a==c);
//  cout<<(a==c && b[0]==d[0] && b[1]==d[1]);
//  cout<<(a==c && b[0]==d[0] && b[1]==d[1] && (b[2]<='C')==(d[2]<='C'));
//  cout<<(a==c && b[0]==d[0] && b[1]==d[1] && (b[2]<='C')==(d[2]<='C') && abs(b[2]-d[2])==1);
    return 0;
}
// 8:59 AK

//倒序开题 8:40 解决 T4,8:44 解决 T3,8:56 解决 T2,8:59 解决 T1 
// T1<T3<T4<T2 

//我常常乘坐高铁。
//我常常修改字串。
//我常常选数运算。
//我常常游玩卡牌。

// 代码里总得加一句 CCF 对吧 

// 千万不要用 list 容器 
// 特别是在 NOIp 

// X X XXX 

// 反正我不会这题,交个随机数吧 

// dino 玩到了 3140 分,surf 玩到了 6411 分,纪念一下 
SC-J02089\card\card.cpp

#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,m,a[500010],pos[500010],cnt[500010],ans[500010];
signed main() {
    ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 
    freopen("card.in","r",stdin);
    freopen("card.out","w",stdout);
    cin>>n>>m;
    for(int i=1;i<=n;i++) cin>>a[i],pos[a[i]]=max(pos[a[i]],i),cnt[i]=1;
    for(int i=1;i<=n;i++) cnt[pos[a[i]]+1]+=cnt[i];
    for(int i=1;i<=n;i++) ans[a[i]]+=cnt[i];
    for(int i=1;i<=m;i++) cout<<ans[i]<<" ";
    return 0;
} 
// 8:34 会 T4  
// 8:40 写完 
//今年 T4 怎么这么简单啊 

:::

我常常乘坐高铁。
我常常修改字串。
我常常选数运算。
我常常游玩卡牌。

我常常合成水晶。
我常常乘坐地铁。
我常常观察候鸟。
我常常建造基地。

frein(travel.in,stdin);

SC-J01655 的所有题目均使用了

frein(xxx.in,stdin);
freout(xxx.out,stdout);

当文件读写。

我要上电视

SC-J01823 老师,你上电视了!

:::info[代码]

SC-J01823\card\card.cpp

...
/*
上午考J组,下午还要考S组。。。
我想上电视可以吗。。。
貌似J很简单,may be 100+100+100+48=348,SC 1=线总不可能上300吧。。。,评测机不要卡我常555,那么S组一定就很难了吧。。。
如果S我没有1=,I'll AAAAAAFFFFFFFFFFFOOOOOOOOOO。
也是直接遗憾离场了。。。

下午S我会继续写的,所以可以蹲一个后续。。。 
*/

:::

虽然因为没有那么多的时间和精力,很可惜我只统计了 J 组,不过这说明你能同时进两篇迷惑行为大赏了🤓

__attribute__((always_inline))

:
我是 SC-J01677,我想上电视
能满足我吗喵

终于看到有人在正赛写这个(指 __attribute__((always_inline)) inline)了,感动。

:::info[代码]

SC-J01677\string\string.cpp

/*
Author: kkksc98
关注 kkksc98 谢谢喵
*/
#include <bits/stdc++.h>
#define int long long
#define inl_force __attribute__((always_inline)) inline
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i, a, b) for (int i = (a); i >= (b); --i)
using namespace std;
template<typename Tp> inl_force Tp input() {
    int x = 0;
    int f = 1;
    char ch = getchar();
    while (!isdigit(ch)) {
        if (ch == EOF)  return 0;
        if (ch == '-')  f = -1;
        ch = getchar();
    }
    while (isdigit(ch)) {
        x = (x << 3) + (x << 1) + (ch - '0');
        ch = getchar();
    }
    return x * f;
}
template<typename Tp> inline void output(Tp x) {
    if (x < 0)  x = -x, putchar('-');
    if (x > 9)  output(x / 10);
    putchar(x % 10 + '0');
}
const int N = 2e5 + 5;
int n, ans, sum, id_L, id_R, a[N];
char c[N];
struct Segment {
    int cnt;
    char c;
} L[N], R[N];
inl_force void solve() {
    int now_sum = 0;
    int LIM = (sum >> 1);
    rep(i, 1, n) {
        if (now_sum + a[i] >= LIM) {
            L[++id_L].cnt = LIM - now_sum;
            L[id_L].c = c[i];
            a[i] -= (LIM - now_sum);
            now_sum = LIM;
            break;
        } else {
            L[++id_L].cnt = a[i];
            L[id_L].c = c[i];
            now_sum += a[i];
            a[i] = 0;
        }
    }
    per(i, n, 1) {
        if (a[i] == 0)  break;
        R[++id_R].cnt = a[i];
        R[id_R].c = c[i];
        a[i] = 0;
    }
    for (int i = 1, j = 1; i <= id_L && j <= id_R; ++i) {
        while (L[i].cnt > 0) {
            if (L[i].cnt >= R[j].cnt) {
                if (L[i].c != R[j].c)   ans += R[j].cnt;
                L[i].cnt -= R[j++].cnt;
            } else {
                if (L[i].c != R[j].c)   ans += L[i].cnt;
                R[j].cnt -= L[i].cnt;
                L[i].cnt = 0;
            }
        }
    }
    return ;
}
inl_force void solve_now() {
    int now_sum = 0;
    int LIM = (sum >> 1);
    rep(i, 1, n) {
        if (now_sum + a[i] > LIM) {
            L[++id_L].cnt = LIM - now_sum;
            L[id_L].c = c[i];
            a[i] -= ((LIM - now_sum) + 1);
            now_sum = LIM;
            break;
        } else if (now_sum + a[i] == LIM) {
            L[++id_L].cnt = LIM - now_sum;
            L[id_L].c = c[i];
            a[i] -= (LIM - now_sum);
            --a[i + 1];
            break;
        } else {
            L[++id_L].cnt = a[i];
            L[id_L].c = c[i];
            now_sum += a[i];
            a[i] = 0;
        }
    }
    per(i, n, 1) {
        if (a[i] == 0)  break;
        R[++id_R].cnt = a[i];
        R[id_R].c = c[i];
        a[i] = 0;
    }
    for (int i = 1, j = 1; i <= id_L && j <= id_R; ++i) {
        while (L[i].cnt > 0 && j <= id_R) {
            if (L[i].cnt >= R[j].cnt) {
                if (L[i].c != R[j].c)   ans += R[j].cnt;
                L[i].cnt -= R[j++].cnt;
            } else {
                if (L[i].c != R[j].c)   ans += L[i].cnt;
                R[j].cnt -= L[i].cnt;
                L[i].cnt = 0;
            }
        }
    }
    return ;
}
signed main() {
    freopen("string.in", "r", stdin);
    freopen("string.out", "w", stdout);
    n = input<int>();
    rep(i, 1, n) {
        a[i] = input<int>();
        c[i] = getchar();
        sum += a[i];
    }
    if (sum % 2 == 0)   solve();
    else    solve_now();
    output(ans);
    return 0;
}
/*
09:12 写完准备测样例
09:16 样例 WA 了
09:24 重新写完
09:27 样例 3 WA 了
09:28 重测样例
09:30 样例通过
*/

:::

虽然但是为啥写了这么长。

公开处刑(?)

SC-J01797 在 T4 贴了 \color{red}671 句 @double_bird 我喜欢你喵!&#x1F628;

是不是有点重力了&#x1F628;

区神

:::info[代码]

SC-J02114\string\string.cpp

...
/*
 I'm the god , and the smartest brain in the world  think this code isn't correct .
 Although I have much power , but I can't find any data can hack it.(Well ,the true is,I'm too lazy)
 Q : Do you know who am I ? A : I'm the god of qu!!! 
*/
SC-J02114\card\card.cpp

...
/*

I've been running in the strange life
chasing all the green lights
throwing of the shade for a little bit sun shine

qi dai ananta qwq , hate wang yi's yun ying.

*/

/*

I'm very angry!!!
Becase the jian kan guan(an old man)
doesn't allow me to paly the game(the little dinosaur/xiao kong long)(surfing/chong lang).

*/

/* I don't know the correct code of the forth question */

/* I'm the king of qu. */

/* shi jie quan ju zhong , huan ying lai dao xin ai li du */

/* en ne ~ , en ne wa da, en ne en ne ! */

/* 

bu shu yu zhe ge shi dai de yu zhe
hui wu zhi shang de wei da zhu zai
zhi zhang hao yun de huang hei zhi wang
nin zhong cheng de xin tu xiang nin qi qiu hao yun
ke wang nin bao you wo na dao j1= s1=
hui hu po , jiang li liang chuan di gei wo de zhou wen
kang nai xin , jiang li liang chuan di gei wo de zhou wen
zan mei yu zhe

*/

/* a!~ zhe yang shou zhen TM gou jing */ 

:::

哒↘哒↗哒↘哒↗哒↘,好想玩原神😨

:::info[代码]

SC-J01781\*\*.cpp

#include<bits/stdc++.h>
#define LoveCyrene ios :: sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr)
#define LoveAnastasya freopen("string.in", "r", stdin)
#define LoveOdette freopen("string.out", "w", stdout)

:::

whk 大手子

祝好!

:::info[代码]

SC-J01014\card\card.cpp

#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("card.in","r",stdin);
    freopen("card.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
  /*学文化去了,OI太难学了,还是语数英好学
    我确实有点懒了,
    但感谢各位工作人员的鼎力支持,祝各位一帆风顺;
         10101       121212121212      121212121212    101010101010
         10                    12      12        12    10        10
    101010101010               12      12        12    10        10
    10        10     12        21      12        12    10        10
    10        10     12        12      121212121212    101010101010
    101010101010     121212121212                12              10
    10                         12                12              10
    10                  121212121                12              10
    10                         12                12              10
    10                         12                12              10
    10               121212121212       12121212121    101010101010
    最磕的一对CP
    return 0;
}
(没有 */)

:::

渣渣帅,吴。迪,队。英改。师!

SC-J01259 在 T4 末尾放了 30KB 的

/*渣渣帅,吴。迪
  队。英改。师!*/ 

以及 T1 的:

//olD-mOwOn;
/*霉条,补。市区*/ 
/*回家第一件事,打开KARDSjjc,150金币一次我非常癫狂,德国主国法国盟国三张撤退坦克
还有俯冲懵逼哥谁能如何我?!*/ 

freopen("xxx.in","w",stdin)

call call back 一下。出现的 24 次来自于以下同学:

SC-J00032,TA 只有 T3 是这么写的&#x1F914;

SC-J00186,你包领了。

SC-J00233,你怎么和 SC-J00032 一样只有 T3 是这么写的/咦

SC-J00706,你也包领了。

SC-J01029 老师与众不同,别人是交换 r w,TA 的两个 freopen 都写了 w。

SC-J01086 比较强大,TA 的头文件是 #include <bits/std c++.h>;,关同步流的方式是 ios::sync_with_studio(false); cin.tie(pulltr);,换行是 /n。

SC-J01352,SC-J01650,SC-J01974,你们都包领了。

三峡,记承天寺夜游,渡荆门送别

:::info[代码]

SC-J00247\travel\travel.cpp

...
/*
自三峡七百里中,两岸连山,略无阙处。重岩叠嶂,隐天蔽日。自非亭午夜分,不见曦月。
风烟俱净,天山共色。从流飘荡,任意东西。自富阳至桐庐一百余里,奇山异水,天下独绝。
水皆缥碧,千丈见底。游鱼细石,直视无碍。急湍甚箭,猛浪若奔。
元丰六年十月十二日夜,解衣欲睡,月色入户,欣然起行。念无与为乐者,遂至承天寺寻张怀民。怀民亦未寝,相与步于中庭。
庭下如积水空明,水中藻,荇交横,盖竹柏影也。何夜无月,何处无竹柏,但少闲人如吾两人者耳。
渡远荆门外,来从楚国游。山随平野尽,江入大荒流。月下飞天镜,云生结海楼。仍怜故乡水,万里送行舟。
*/

:::

Die For You,Da Capo

xm 会默写。

:::info[代码]

SC-J00313\and\and.cpp

...
/*
What do you see before it's over
Blinding flash is getting closer
Wish there's something left to lose
It's could be the day I die for you
*/
SC-J00313\card\card.cpp

#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N=5e5+10,M=3e5+10;
int a[N],las[N],res[N],cnt[N];
signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    freopen("card.in","r",stdin);
    freopen("card.out","w",stdout);
    int n,m;cin>>n>>m;
    for(int i=1;i<=n;i++) cin>>a[i];
    for(int i=n;i>=1;i--){
        if(!las[a[i]]) las[a[i]]=i;
        cnt[i]=1;
    }
    for(int i=1;i<=n;i++) cnt[las[a[i]]+1]+=cnt[i],res[a[i]]+=cnt[i];
    for(int i=1;i<=m;i++) cout<<res[i]<<" ";
    return 0; 
}/*lg_751367
When good old friends are going away
Will you wish them to remember your name
When good old days are passing away
Will you promise your heart remains the same
Never can we surspend the time
Having to leave the tracks behind
There's a longer way ahead, after all
There used to be a story teller 
Who always paints the sunshine and the rain
One has to even truly grow up
Spending a lifetime to taste love and pain
Never can we surspend the time
Having to leave the tracks behind
There's longer way ahead, after all
If it's too hard to say goodbye
Give us a try to sing a rhythm
May you the beauty of this world, always shine
*/

:::

#include<bits/stl_iterator_base_types.h>

这个人的代码怎么复制的是 #include<bits/stl_iterator_base_types.h>。

:::info[代码]

SC-J00422\and\and.cpp

// Types used in iterator implementation -*- C++ -*-

// Copyright (C) 2001-2014 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/*
 *
 * Copyright (c) 1994
 * Hewlett-Packard Company
 *
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.  Hewlett-Packard Company makes no
 * representations about the suitability of this software for any
 * purpose.  It is provided "as is" without express or implied warranty.
 *
 *
 * Copyright (c) 1996-1998
 * Silicon Graphics Computer Systems, Inc.
 *
 * Permission to use, copy, modify, distribute and sell this software
 * and its documentation for any purpose is hereby granted without fee,
 * provided that the above copyright notice appear in all copies and
 * that both that copyright notice and this permission notice appear
 * in supporting documentation.  Silicon Graphics makes no
 * representations about the suitability of this software for any
 * purpose.  It is provided "as is" without express or implied warranty.
 */

/** @file bits/stl_iterator_base_types.h
 *  This is an internal header file, included by other library headers.
 *  Do not attempt to use it directly. @headername{iterator}
 *
 *  This file contains all of the general iterator-related utility types,
 *  such as iterator_traits and struct iterator.
 */

#ifndef _STL_ITERATOR_BASE_TYPES_H
#define _STL_ITERATOR_BASE_TYPES_H 1

#pragma GCC system_header

#include <bits/c++config.h>

#if __cplusplus >= 201103L
# include <type_traits>  // For _GLIBCXX_HAS_NESTED_TYPE, is_convertible
#endif

namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  /**
   *  @defgroup iterators Iterators
   *  Abstractions for uniform iterating through various underlying types.
  */
  //@{ 

  /**
   *  @defgroup iterator_tags Iterator Tags
   *  These are empty types, used to distinguish different iterators.  The
   *  distinction is not made by what they contain, but simply by what they
   *  are.  Different underlying algorithms can then be used based on the
   *  different operations supported by different iterator types.
  */
  //@{ 
  ///  Marking input iterators.
  struct input_iterator_tag { };

  ///  Marking output iterators.
  struct output_iterator_tag { };

  /// Forward iterators support a superset of input iterator operations.
  struct forward_iterator_tag : public input_iterator_tag { };

  /// Bidirectional iterators support a superset of forward iterator
  /// operations.
  struct bidirectional_iterator_tag : public forward_iterator_tag { };

  /// Random-access iterators support a superset of bidirectional
  /// iterator operations.
  struct random_access_iterator_tag : public bidirectional_iterator_tag { };
  //@}

  /**
   *  @brief  Common %iterator class.
   *
   *  This class does nothing but define nested typedefs.  %Iterator classes
   *  can inherit from this class to save some work.  The typedefs are then
   *  used in specializations and overloading.
   *
   *  In particular, there are no default implementations of requirements
   *  such as @c operator++ and the like.  (How could there be?)
  */
  template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
           typename _Pointer = _Tp*, typename _Reference = _Tp&>
    struct iterator
    {
      /// One of the @link iterator_tags tag types@endlink.
      typedef _Category  iterator_category;
      /// The type "pointed to" by the iterator.
      typedef _Tp        value_type;
      /// Distance between iterators is represented as this type.
      typedef _Distance  difference_type;
      /// This type represents a pointer-to-value_type.
      typedef _Pointer   pointer;
      /// This type represents a reference-to-value_type.
      typedef _Reference reference;
    };

  /**
   *  @brief  Traits class for iterators.
   *
   *  This class does nothing but define nested typedefs.  The general
   *  version simply @a forwards the nested typedefs from the Iterator
   *  argument.  Specialized versions for pointers and pointers-to-const
   *  provide tighter, more correct semantics.
  */
#if __cplusplus >= 201103L

_GLIBCXX_HAS_NESTED_TYPE(iterator_category)

  template<typename _Iterator,
       bool = __has_iterator_category<_Iterator>::value>
    struct __iterator_traits { };

  template<typename _Iterator>
    struct __iterator_traits<_Iterator, true>
    {
      typedef typename _Iterator::iterator_category iterator_category;
      typedef typename _Iterator::value_type        value_type;
      typedef typename _Iterator::difference_type   difference_type;
      typedef typename _Iterator::pointer           pointer;
      typedef typename _Iterator::reference         reference;
    };

  template<typename _Iterator>
    struct iterator_traits
    : public __iterator_traits<_Iterator> { };
#else
  template<typename _Iterator>
    struct iterator_traits
    {
      typedef typename _Iterator::iterator_category iterator_category;
      typedef typename _Iterator::value_type        value_type;
      typedef typename _Iterator::difference_type   difference_type;
      typedef typename _Iterator::pointer           pointer;
      typedef typename _Iterator::reference         reference;
    };
#endif

  /// Partial specialization for pointer types.
  template<typename _Tp>
    struct iterator_traits<_Tp*>
    {
      typedef random_access_iterator_tag iterator_category;
      typedef _Tp                         value_type;
      typedef ptrdiff_t                   difference_type;
      typedef _Tp*                        pointer;
      typedef _Tp&                        reference;
    };

  /// Partial specialization for const pointer types.
  template<typename _Tp>
    struct iterator_traits<const _Tp*>
    {
      typedef random_access_iterator_tag iterator_category;
      typedef _Tp                         value_type;
      typedef ptrdiff_t                   difference_type;
      typedef const _Tp*                  pointer;
      typedef const _Tp&                  reference;
    };

  /**
   *  This function is not a part of the C++ standard but is syntactic
   *  sugar for internal library use only.
  */
  template<typename _Iter>
    inline typename iterator_traits<_Iter>::iterator_category
    __iterator_category(const _Iter&)
    { return typename iterator_traits<_Iter>::iterator_category(); }

  //@}

  // If _Iterator has a base returns it otherwise _Iterator is returned
  // untouched
  template<typename _Iterator, bool _HasBase>
    struct _Iter_base
    {
      typedef _Iterator iterator_type;
      static iterator_type _S_base(_Iterator __it)
      { return __it; }
    };

  template<typename _Iterator>
    struct _Iter_base<_Iterator, true>
    {
      typedef typename _Iterator::iterator_type iterator_type;
      static iterator_type _S_base(_Iterator __it)
      { return __it.base(); }
    };

#if __cplusplus >= 201103L
  template<typename _InIter>
    using _RequireInputIter = typename
      enable_if<is_convertible<typename
        iterator_traits<_InIter>::iterator_category,
                   input_iterator_tag>::value>::type;
#endif

_GLIBCXX_END_NAMESPACE_VERSION
} // namespace

#endif /* _STL_ITERATOR_BASE_TYPES_H */

:::

这是什么做法

大哥你枚举所有情况枚举成 ABCDE 了/xk

:::info[代码]

SC-J01111\travel\travel.cpp

#include <bits/stdc++.h> 
#define ll long long 
#define rep(i, j, k) for (int i = j; i <= k; i++) 
#define dow(i, j, k) for (int i = j; i >= k; i--) 

std::string s1, s2, c1, c2; 

std::map < std::pair < std::string, std::string >, bool > ans[5]; 

signed main() {
//  freopen("travel6.in", "r", stdin); 
    freopen("travel.in", "r", stdin); 
    freopen("travel.out", "w", stdout); 
    ans[1][{"00", "00"}] = 1; 
    ans[1][{"01", "01"}] = 1; 
    ans[1][{"02", "02"}] = 1; 
    ans[1][{"03", "03"}] = 1; 
    ans[1][{"04", "04"}] = 1; 
    ans[1][{"05", "05"}] = 1; 
    ans[1][{"06", "06"}] = 1; 
    ans[1][{"07", "07"}] = 1; 
    ans[1][{"08", "08"}] = 1; 
    ans[1][{"09", "09"}] = 1; 
    ans[1][{"10", "10"}] = 1; 
    ans[1][{"11", "11"}] = 1; 
    ans[1][{"12", "12"}] = 1; 
    ans[1][{"13", "13"}] = 1; 
    ans[1][{"14", "14"}] = 1; 
    ans[1][{"15", "15"}] = 1; 
    ans[1][{"16", "16"}] = 1; 
    ans[1][{"17", "17"}] = 1; 
    ans[1][{"18", "18"}] = 1; 
    ans[1][{"19", "19"}] = 1; 
    ans[2][{"00A", "00A"}] = 1; 
    ans[2][{"00A", "00B"}] = 1; 
    ans[2][{"00A", "00C"}] = 1; 
    ans[2][{"00A", "00D"}] = 1; 
    ans[2][{"00A", "00E"}] = 1; 
    ans[2][{"00B", "00A"}] = 1; 
    ans[2][{"00B", "00B"}] = 1; 
    ans[2][{"00B", "00C"}] = 1; 
    ans[2][{"00B", "00D"}] = 1; 
...

:::

那你也进来吧

:::info[代码]

SC-J00495\travel\travel.cpp

...
/*
8:31 解压,密码:Trick||Treat! ?
8:32 读 T1
8:33 红题!!!
8:42 秒杀!
8:42 读 T2
8:44 T2 黄?
8:49 测大样例......
8:51 大样例全过了?!
8:52 读 T3
8:54 坏了,T3 一眼没思路
8:56 有一点点思路,试试?说干就干!
9:01 测大样例
9:02 坏了,挂了,调代码......
9:03 饭堂了,0 写成 1 了
9:04 再测大样例,全对
9:05 读 T4
9:06 嗯...不会,想一想
9:08 盲猜留下来的数有一定性质
9:11 有点模糊的思路,模拟一下(终于用上草稿纸了)
9:15 思路假了
9:39 好像分析出思路了~~~
9:47 写完了,测大样例
9:50 大样例全过?我...AK了?
9:55 用虚拟机跑一下
9:57 !不对,我怎么用size类型和long long比,强转!
9:58 编译通过
9:58 开始提交
9:58 交完了,开始对...不对,暴力好像不是很好写
9:59 算了,总结一手,反正也没事干。
10:00 总结

# 总结
今天是CSP考试,应该会挂分吧。。。但是又不想对拍。
今天上午的思维过程如上,下面应该还会写。
这个应该可以进人类迷惑行为大赏吧。
再看看题目:

T1 : 我的评价是上红下橙,算法:选择结构,大唐题,
只是细节有点多,成功成为四道题中最长最屎的代码,O(1)。
T2 : 黄题吧,定义两个指针从两边往中间扫就行了,
O(n)。
T3 : 黄 or 绿?反正感觉好像很水,
贪心考虑从大往小枚举每一位,
然后将那位是 1 的放进候选,其余不要。
分类讨论如果候选有 m 个答案的那一位就是 1,
反之为 0 。需要注意的是下一次选侯选应从
上一轮选出的里面选,复杂度 O(n log maxa)。
T4 : 绿 or 青?有点思维含量,但是通过手玩样例,
从而发现一些性质,即设一个数的贡献为一个状态,
即:从一个位置开始操作剩下的有哪些作为一个状态,
每次从后往前扫,若是第一次出现,就是在上一个状态
中加上它自己,反之就是上一个它自己的状态,
通过这些指针可以成功建出一颗树,同时保存每一个数
第一次出现的位置作为根,然后统计子树大小就行了,
复杂度 O(n+m)。

题目难度大概是红黄黄青吧,但是我感觉我赛事切青
不太可能,还是评绿吧,J 组也是越来越简单了。

10:17 写完总结
10:18 无聊
10:19 睡觉
10:47 椅子太高了,不舒服,睡不着
10:48 玩会虚拟机(这学校机房竟然没有蜘蛛纸牌,太恶心了)
11:04 不好玩,玩会...不知道玩啥了,睡觉

真心想进迷惑行为大赏,感谢作者。
qwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwq
qwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwq
qwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwq
qwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwqqwq
*/

:::

作者显然是好人啊,有求必应,&#x1F60B;

咋考试的时候有人在楼下弹《妄想感伤代偿联盟》?

:::info[代码]

SC-J00520\and\and.cpp

...
/*
????咋考试的时候有人在楼下弹《妄想感伤代偿联盟》???
孩子的思路是错的好难受 
哎对了?
这个特殊B咋没过但是样例5过了呢?
赌一把只是过不了特性B
...

:::

这么牛,哪个考场的,

Buy buy baby blue~

:::info[代码]

SC-J00531\travel\travel.cpp

...
/*

Buy buy baby blue~

 _|__|_|_ 
/        \        
|  .  .  |                       _____
|   V    |                      /____/|
\_______/    ___________       |    | |     
    |       /          /\      |RP++| |   
----|----  / 999.99$  /  \     |RK--| |    
    |     /__________/____\    |____|/ 
    |             
   /\             
  /  \             
  |   |              

  \O/
   |
   /\  
  \O/
   |
  /\  
  \O/
   |
   /\  
  \O/
   |
  /\  
  \O/
   |
   /\  
  \O/
   |
  /\  
  \O/
   |
   /\  
  \O/
   |
  /\  
  \O/
   |
   /\  
  \O/
   |
  /\  
...

:::

我还是绷住吧,!

@wsy_I 祝 99

:::info[代码]

SC-J01653\card\card.cpp

...
//code by wsy_I. luogu uid: 1152799
/*
J 组 AK 了,这个题在对拍。我猜的结论,目前拍了很多组没拍出来。
应该是时候写点什么,发表一下感慨了?
(话说我这个不会要上迷惑行为大赏吧)

哎,其实我这个时候来打比赛实际上是心态爆炸的,很容易情绪失控。
J 组当时 T4 跑过所有大样例的时候都差点哭出来了。
学校分班之后,也不知道我和 npy 现在关系怎么样了。
我对她还重要吗。我是不是一个可有可无的人了。
她曾是我前途路上的灯塔啊。而我之前对她啥也不是。
我就是一个初一下学期分班考全班倒一的滚木。
她已经给我很多面子了,我还强求永远在一起干嘛。
她现在都在遂宁了。跟现在在考试的我隔着几百公里。
至少她给过我美好的回忆。至少我一直会对她好。这就足够了。
*/

:::

被骗进来了

:::info[代码]

SC-J00927\travel\travel.cpp

...
//freopen("travel.in","r",stdin);
//freopen("travel.out","w",stdout);
// freopen("travel.in","r",stdin);
// freopen("travel.out","w",stdout);

// 骗你进来的,来听歌
/*
You meet the playlist at your very Chinese time
The musics are so good, a devil may cry

大概顺序该是 321?
*/

/*
Soaring through the city again today
I get to see smile again
'Cause any thing in the world couldn't take its place
Cutting through the gentle breeze
Resting in the sunlight's ease
Days like this means so much more to me right now
God I wish these days would never fade away
A letter is a piece of the heart
That's where the story begins
Here you go(wow) with me(wow)
It's the color of love
Sometimes the color of tears
Every shade inside the heart
I'll send them far and anywhere
Anywhere
...

:::

当然,下次不建议注释 freopen 骗大家进来,因为这个实在是太多了。你可以使用一些更加猎奇的方法&#x1F60B;(?)

@Hamburger999 女装

机房同学最真切的愿望。

:::info[代码]

SC-J01276\card\card.cpp

...
/*
FAKE !!// freopen(".in", "r", stdin);
FAKE !!// froepen(".out, "w", stdout);
bestart AK ioi
xie_yu_fei AK ioi
@Hamburger999 女装!!!!!!!!!!!

can't you! can't you! love me 中?
---------------------------------------------------------
5 3
31 3 1 15 7

don't use x1 y1 ....!!!

*/
...

:::

好像是被爆零星神瞥视了一样

:::info[代码]

SC-J01358\card\card.cpp

...
/*
想进奇葩大赏 doge
T1 8:45
T2 9:21 
T3 9:45
T4 棍木:棍木 
看样子T4应该是没了,T3打了个暴力只优化了一下,一想到下周还要半期考9科就有点炸钢。
已经学了3年c++了,但就好像是被爆零星神瞥视了一样,每次都在莫名其妙的地方爆零。
希望这次不会吧。
同龄人都打上NOIP了,我J组还没拿过一等奖(破绷了) ,也许是真的没什么天赋啊 
为了今天的比赛昨天我甚至没有打崩铁和火影!!!!!!! 
去年我们学校的 Asoccia(好像叫这个吧) 怒斥了学校和€€£,这里我就不说了 但今年报名费是真贵啊,18斤牛肉(bushi) 
中考确实带走了我很多朋友,显得高中有些太乏味了,感觉学的还算比较好的只有化学能进年纪前十了 
现在在犹豫是选物化生还是物化地,虽说生物简单点但竞争有点大,但是地理做起来像赤石一样
下午再看看S组强度吧
再爆零我真退役了
—————————— 
在人海的节奏随波,
但只能在昨天诉说,
梦想分数   化作泡沫
却只能寄托
可能有少数人记得
回忆 却成为了枷锁
请你遗忘我
请你遗忘我
月初冲分的村里  
整理对局的思绪
你曾是我的保底
我最自信的保底
可是我已无法找到自己的中场
像在思路之间 设了防
我们的羁绊并非点不亮
只是被困在那个梯度榜
阿巴阿巴阿巴阿巴阿巴阿巴阿巴 
—————————— 
LGID:myubi(UID忘了 嘻嘻)
*/

:::

打开评测开关!

SC-J01375 在每个代码都粘了一遍:

:::info[代码]

/**
 * 打开评测开关!
 * 打开评测开关!
 * 打开评测开关!
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 * 打开评测开关
 */

:::

宇宙冷漠这张牌我是非常了解的,

:::info[代码]

SC-J01694

#include<bits/stdc++.h>
using namespace std;

int main(){
    freopen("card.in","r",stdin);
    freopen("card.out","w",stdout);

    return 0;
}
/*
高中老登被隔壁小孩哥暴力炸了有感觉吗
写代码写一半蓝屏了有感觉吗,开机之后时间显示错了有感觉吗
现在是2026年10月30日晚8点
去年的J00165也是我,可惜今年我记不起来歌词了
愤怒了,愚行了,悔恨了,执迷了,尖啸了,幽魂形态了,萎靡了,宇宙冷漠了,耸肩无视(并非)了
回响形态了
回响形态
下午再整活,S00412
↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓↑↓
 */

:::

给 CCF 表白了

:::info[代码]

SC-J01768\travel\travel.cpp

...
/*
求CCF让我RP++
Luogu:__Dhc666__
uid:?(谁会记这玩意?)

(别看这个)链接:http://192.168.114.124/collect/download/kGpe3ZPbzFtqgjlQiQwU
解压密码:Trick||Treat!(不给糖就捣蛋)

cmd:
fc [文件1] [文件2]

下面是游记:

8:30 入考场,发现自己的J和S考场座位号一样(雷霆解压密码)

9:06 ACt1~~(t1水题,对于HCM来说这题太简单了)~~;

9:23 t2骗分(感觉在哪见过)

9:25 t3长得那么像背包?

9:37 t3貌似不能用DP:(

9:41 貌似想出t2正解

10:04 t2搞不出来,尝试骗分

10:30 t2>=50pts;开始t3骗分:)

11:14 t3>=50pts;

11:16 开始t4骗分

11:19 发现这次ccf给了1GB的空间:)

11:30 不能上厕所了,估分200+;

11:34 1=有问题吗??????

11:45 想上Luogu代码大赏

11:48 t4没骗到

11:50 发现t2忘写freopen了

11:55 交卷了

11:57 t4交上了!!!:)

*/
//freopen("travle.in","r",stdin);
//freopen("travle.out","w",stdout);
//I love ccf very much,more than other thing.

:::

大炮打蚊子

T4 原来是&#x1F9D0;,主席树!!??&#x1F630;&#x1F630;&#x1F630;

:::info[代码]

SC-J01897\card\card.cpp

#include<bits/stdc++.h>
//#define int long long 
#define endl '\n'
#define YUANSHEN ios_base::sync_with_stdio(0);
#define QIDONG cin.tie(0);
#define inf 1e14
#define mod 998244353
#define frein freopen("card.in","r",stdin);
#define freout freopen("card.out","w",stdout);
#define pii pair<int,int>
using namespace std;
const int maxn=1e6+10;

/*
难点在于考察 i 存在的充要条件
考虑递推
从后往前做
f_i 表示以 i 为起点的出现数的桶数组
l_i 表示最小的 j>i 满足 a_i=a_j
那么有转移:
f_i=f_{l_i}|=a_i
直接主席树!!!!!!!!!!!!
统计答案的话,对于每个根打标记,然后下传计算一下贡献即可
*/

int ans[maxn],a[maxn],n,m,lst[maxn],root[maxn];

struct HJTtree{
    int idx=0;
    struct Node{int sum,lc,rc,tag; bool vised;}tr[maxn*20];
    void pushup(int u){tr[u].sum=tr[tr[u].lc].sum+tr[tr[u].rc].sum;}
    int build(int l,int r){
        int u=++idx,mid=(l+r)>>1;
        if(l!=r)tr[u].lc=build(l,mid),tr[u].rc=build(mid+1,r);
        return u;
    }
    int update(int pos,int l,int r,int x){
        int u=++idx,mid=(l+r)>>1; tr[u]=tr[pos];
        if(l==r){tr[u].sum=1; return u;}
        else if(mid>=x)tr[u].lc=update(tr[pos].lc,l,mid,x);
        else tr[u].rc=update(tr[pos].rc,mid+1,r,x);
        pushup(u); return u;
    }
    void Query(int u,int l,int r){
        if(tr[u].vised)return;
        tr[u].vised=true;
        if(l==r){ans[l]+=tr[u].tag*tr[u].sum; return;}
        int mid=(l+r)>>1;
        Query(tr[u].lc,l,mid),Query(tr[u].rc,mid+1,r);
    }
    void puttag(int u){tr[tr[u].lc].tag+=tr[u].tag,tr[tr[u].rc].tag+=tr[u].tag,tr[u].tag=0;}
    void Add(int u){tr[u].tag++;}
    void Output(int u,int l,int r){
        int mid=(l+r)>>1;
        if(l==r)cout<<tr[u].sum<<" ";
        else Output(tr[u].lc,l,mid),Output(tr[u].rc,mid+1,r);
    }
}T;

bitset<maxn*20> vis;

void Put(){
    queue<int> q;
    for(int i=1;i<=n;i++)
        q.push(root[i]),T.Add(root[i]),vis[root[i]]=true;
    while(q.size()){
        int u=q.front(); q.pop();
        if(!T.tr[u].lc)continue;
        T.puttag(u);
        if(!vis[T.tr[u].lc])vis[T.tr[u].lc]=1,q.push(T.tr[u].lc);
        if(!vis[T.tr[u].rc])vis[T.tr[u].rc]=1,q.push(T.tr[u].rc);
    }
}

void GetAns(){
    for(int i=1;i<=n;i++)
        T.Query(root[i],1,m);
    for(int i=1;i<=m;i++)
        cout<<ans[i]<<((i!=m)?(" "):(""));
}

signed main(){
    YUANSHEN QIDONG
    frein freout
    cin>>n>>m;
    for(int i=1;i<=n;i++)cin>>a[i];
    root[n+1]=T.build(1,m);
    for(int i=n;i;i--){
        if(!lst[a[i]])root[i]=T.update(root[i+1],1,m,a[i]);
        else root[i]=T.update(root[lst[a[i]]],1,m,a[i]);
        lst[a[i]]=i;
    }
    Put(),GetAns();
    return 0;
}

/*
CSP2026 邮寄

教练让我们打 J。

# 上午

在大巴上随机进行了一些膜拜,前往考场

到了考场楼下,发现了门口的**保安**,一群人开始哄笑

更牛的是发现考场居然有 6 层楼,而且门口有一个 C 区,并且 C 前面有一个 C 的印子

所以说今天真的是潜入 CCE

然后进入考场,发现每个人都带了 inf 件食物

开题,喵了一眼四个题,直接会了 3 个

开写,不知道为啥 T2 写得非常狗屎,写了特别久,10:00 才调过

T3 2min 就过了

开 T4,发现直接倒着做套个主席树就做完了,然后发现并不会噗叽组做法,于是开写,大概 10:40 就过了(直到我现在在写游记的 11:47 才发现是个树的形态,很容易拆贡献。。。应该不会被卡常吧。。。)

写了后面 3 个题的对拍,然后就没事干了,上了 3 次厕所,炫完了一袋甘蔗,出考场已经饱了
*/

:::

作者翻到这么多已经力竭了&#x1F635;,即将去耍起,大家如果有没上的猎奇小代码一定要给我,我也很想看&#x1F9D0;&#x1F9D0;&#x1F9D0;