2024 CSP-J AH 迷惑行为大赏

· · 个人记录

有关准考证号:

AH-J00860(前面多了空格)

AH-J01280(同上)

AH-J02179(同上)

AH-J02242(同上)

AD-J01337

AH -J00120(AH 后面多了空格)

AH_J01676

JS-J00860

正片开始

  1. //freopen

一共出现了 244 个 //freopen。挑几个典型例子:

#include<bits/stdc++.h>//AH-J01280
using namespace std;
int ns[10]={6,2,5,5,4,5,6,3,7,6};
int cnt[10000],sum=0;
int find(int n){
    for(int i=0;i<10;i++){
        if(n-ns[i]==0) return i;
        sum=sum*10+find(n-ns[i]);
    }
    return sum;
}

int main(){
    //freopen("stick.in","r",stdin);
    //freopen("stick.out","w",stdout);
    int t;
    cin>>t;
    int n[t];
    for(int i=0;i<t;i++){
        cin>>n[i];
        cout<<find(n[i])<<endl;
    }
    return 0;
}
#include<bits/stdc++.h>//AH-J00032
using namespace std;
int main()
{
    //freopen("explore.in","r",stdin);
    //freopen("explore.out","w",stdout);
    long long n;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        long long nn,m,jinguo=0;
        long long x,y;
        char a[1010][1010];
        long long fangxiang,buzhou;
        cin>>nn>>m>>buzhou>>x>>y>>fangxiang;
        for(int j=1;j<=nn;j++)
        {
            for(int k=1;k<=m;k++)
            {
                cin>>a[j][k];
            }
        }
        if(nn=1&&m==1)
        {
            cout<<1<<endl;
        }
        else{
            if(nn=1&&m==2)
            {
                if(x==1&&y==1&&fangxiang==0&&buzhou==1)
                {
                    cout<<2<<endl;
                }
               if(x==1&&y==1&&buzhou==1&&fangxiang==1||fangxiang==1||fangxiang==3)
                {
                    cout<<1<<endl;
                }
                if(x==1&&y==2&&buzhou==1&&fangxiang==0||fangxiang==1||fangxiang==3)
                {
                    cout<<1<<endl;
                }
                if(x==1&&y==2&&buzhou==1&&fangxiang==2)
                {
                    cout<<2<<endl;
                }
            }
        }
    }
    return 0;
}
  1. stick.in/out 人

共 18 个。依然挑一些典例:

//这位人还将程序名写成了 main.cpp
#include <bits/stdc++.h>//AH-J00665
using namespace std;
int n;
int main()
{
    freopen("stick.in","r",stdin);
    freopen("stick.out","w",stdout);
    cin>>n;
    if(n==5)
    {
        cout<<"-1"<<endl;
        cout<<"1"<<endl;
        cout<<"7"<<endl;
        cout<<"6"<<endl;
        cout<<"208";
    }
    else
    {
cout<<n;
    }
    fclose(stdin);
    fclose(stdout);
    return 0;
}
#include<bits/stdc++.h>//AH-J01017
using namespace std;
typedef long long LL;
LL t,n,num[15]={6,2,5,5,4,5,6,3,7,6},minn=1e9+1;
void dfs(LL x,LL dur,LL ans){
    if(dur>9){
        if(x==0&&ans!=0) minn=min(minn,ans);
        return ;
    }
    if(x<num[dur]){
        dfs(x,dur+1,ans);
    }else{
        dfs(x,dur+1,ans);
        dfs(x-num[dur],dur+1,ans*10+dur);
    }
}
int main(){
    freopen("stick.in","r",stdin);
    freopen("stick.out","w",stdout);
    scanf("%lld",&t);
    while(t--){
        minn=1e9+1;
        scanf("%lld",&n);
        if(n<2){
            printf("-1\n");
            continue;
        }
        dfs(n,0,0);
        if(minn==1e9+1) printf("-1\n");
        else printf("%lld\n",minn);
    }
    return 0;
}
  1. CCF 人

共 142 个。依然挑一些典例:

//AH-J00287
/*
sbccf sbccf sbccf sbccf sbccf
sbccf sbccf sbccf sbccf sbccf
sbccf sbccf sbccf sbccf sbccf
sbccf sbccf sbccf sbccf sbccf
sbccf sbccf sbccf sbccf sbccf
NM! Why are somebody smoking in 8th high middle school??? Fuck!
sbccf sbccf sbccf sbccf sbccf
sbccf sbccf sbccf sbccf sbccf
sbccf sbccf sbccf sbccf sbccf
sbccf sbccf sbccf sbccf sbccf
sbccf sbccf sbccf sbccf sbccf
Everyone which that saw this can take picture of this or send it on the Internet.
Oh the smoking shit fucked of und ccf is not a sehr sb.
*/
#include<bits/stdc++.h>
using namespace std;
int t,n,m,k,d,x,y,i,j,a;
string s;
char mp[1001][1001];
bool f[1001][1001];
void moving()
{
    int xI,yI;
    if(d==0)xI=x,yI=y+1;
    else if(d==1)xI=x+1,yI=y;
    else if(d==2)xI=x,yI=y-1;
    else if(d==3)xI=x-1,yI=y;
    if((xI<1)||(xI>n)||(yI<1)||(yI>m)||(mp[xI][yI]=='x'))d=(d+1)%4;
    else x=xI,y=yI,f[x][y]=true;
}
int main()//          /
{//                                     /
    freopen("explore.in","r",stdin);
    freopen("explore.out","w",stdout);
    scanf("%d",&t);//                         /
    while(t>0)//                              /
    {//                                       /
        a=0;
        scanf("%d%d%d%d%d%d",&n,&m,&k,&x,&y,&d);
        for(i=1;i<=n;i++){
            cin>>s;
            for(j=1;j<=m;j++){
                mp[i][j]=s[j-1];
            }
        }
        for(i=1;i<=1000;i++)for(j=1;j<=1000;j++)f[i][j]=false;
        f[x][y]=true;
        for(i=1;i<=k;i++)moving();
        for(i=1;i<=1000;i++)for(j=1;j<=1000;j++)if(f[i][j]==true)a++;
        printf("%d\n",a);
        t--;
    }
    return 0;
}
//AH-J00989
#include<bits/stdc++.h>
using namespace std;
int t,n,m,b,c,d,e,fuckccf;
char a[1005][1005];
int main(){
    freopen("explore.in","r",stdin);
    freopen("explore.out","w",stdout);
    cin>>t;
    while(t--){
        cin>>n>>m>>b>>c>>d>>e;
        for(int i=1;i<=n;i++){
            for(int j=1;j<=m;j++){
                cin>>a[i][j];
                if(a[i][j]=='.')
                    fuckccf++;
            }
        }
        cout<<fuckccf;
    }
    return 0;
}