跳到正文

休闲·娱乐

2024 & 2025 CSP-J/S 代码迷惑行为大赏(JX)

__Groyhj__QwQ约 13 分钟
原文

这是 2025年11月2日 存档的第 1 版,不是当前版本。查看当前版本

文章信息与版本

文章信息

发布
2025年11月2日
收录
2025年12月12日
更新
2026年11月21日
篇幅
约 13 分钟
获赞
1

版本

  1. v4当前
  2. v3
  3. v2
  4. v1

2024

数据统计

整个江西 CSP-J/S 所有代码共 7.15 MB,其中 J 有 2.70 MB,S 有 4.45 MB。

J 组一共有 948 名选手参加,其中有 925 名选手提交了代码;S 组一共有 497 名选手参加,其中有 495 名选手提交了代码。

bits/stdc++.h

在 J 组中共有 2991 个 bits/stdc++.h,在 S 组中有 1383 个。

freopen

在 J 组中共有 6160 个 freopen,在 S 组中有 3016 个。

//freopen

在 J 组中共有 320 个 //freopen,在 S 组中有 114 个。

freopen(“.out”,“w”,stdin)

代码
JX-S00162\duel
JX-J00094\explore
JX-J00094\poker
JX-J00094\sticks
JX-J00170\sticks
JX-J00285\sticks
JX-J00438\sticks
JX-J00850\explore

freopen(“.in”,“w”,stdin)

代码
JX-J00270\poker
JX-J00288\sticks
JX-J00459\chain
JX-J00459\poker
JX-J00459\sticks
JX-J00592\explore
JX-J00592\poker
JX-J00941\chain
JX-J00941\poker
JX-J00941\sticks

freopen(“.in”,“r”,stdout)

代码
JX-J00850\sticks

freopen(“.out”,“r”,stdout)

在 J 组中共有 26 个 freopen(".out","r",stdout),在 S 组中有 8 个。

freopen(“.in”,“w”,stdout)

代码
JX-S00162\arena
JX-S00162\color
JX-J00198\explore
JX-J00355\explore
JX-J00523\poker
JX-J00718\sticks
JX-J00725\sticks
JX-J00888\explore

,in

代码
JX-S00134\duel
JX-J00058\sticks
JX-J00389\sticks
JX-J00523\chain
JX-J00530\explore
JX-J00672\poker

,out

代码
JX-S00388\color
JX-S00425\detect
JX-S00446\color
JX-J00173\explore
JX-J00173\sticks
JX-J00297\chain
JX-J00297\poker
JX-J00334\chain
JX-J00777\sticks

#define int long long

在 J 组中共有 42 个 #define int long long,在 S 组中有 123 个。

main

在 J 组中共有 3230 个 main,在 S 组中有 1577 个。

mian

代码
JX-S00438\color
JX-S00438\duel
JX-J00337\explore
JX-J00337\poker
JX-J00383\chain
JX-J00622\explore

csp

在 J 组中共有 25 个 csp,在 S 组中有 21 个。

ccf

在 J 组中共有 2 个 ccf,均在 JX-J00847\chain 中,在 S 组中有 5 个,分别是:

代码
JX-S00332\arena
JX-S00386\arena
JX-S00386\duel
JX-S00405\detect
JX-S00449\color

.ans

代码
JX-S00039\arena
JX-S00039\color
JX-S00039\detect
JX-S00039\duel
JX-S00041\duel
JX-S00173\arena
JX-S00371\duel
JX-J00339\explore
JX-J00339\sticks
JX-J00582\poker
JX-J00582\sticks
JX-J00640\poker
JX-J00640\sticks

迷惑行为

以下按准考证字典序排列,如有侵权请联系作者删除。

JX-J00002

chain:忘了输出。

C++
#include<iostream>
using namespace std;
const int N=2*1e+5;
int t;
int n,k,q;
int l[N];
int main(){
    freopen("chain.in","r",stdin);
    freopen("chain.out","w",stdout);
    cin>>t;
    for(int i=0;i<t;i++){
        cin>>n>>k>>q;
    }
    return 0;
}

JX-J00003

explore:读样例大佬。

C++
...
    freopen("explore1.in","r",stdin);
    freopen("explore1.out","w",stdout);
...

JX-J00004

chain:忘了文件读写。

C++
#include<algorithm>
#include<iostream>
#include<string>
#include<cmath>
using namespace std;
int T,n,k,p,l,s[100000][10000],r,c;
int x=1;
int main()
{
    cin>>T;
    while(T)
    {
        cin>>n>>k>>p;
        for(int j=1;j<=n;j++)
        {
            cin>>l;
            for(int i=1;i<=l;i++)
                cin>>s[j][i];
        }
        while(p)
        {
            cin>>r>>c;
            if(s[n][l%r]==c)
            {
                x=0;
                cout<<1<<endl;
            }
        }
        if(x==1)
            cout<<0<<endl;
        T--;
    }
}

JX-J00014

chain:itn大佬,然后自己看吧。

C++
#include<bits/stdc++.h>
using namespace std;
int n,m,ans,x,y,d,k,T;
char a[1010][1010];
int v[1010][1010];
int dx[4]={0,1,0,-1};
itn dy[4]={1,0,-1,0};
node dfs(int i,int j,int f,int step){
    step++;
    if(step==k){
        printf("%d\n",ans);
    }
    int xx=i+dx[f];
    int yy=j+dy[f];
    int p=0;
    if(0<xx&&xx<=n&&0<yy&&yy<=m)p=1;
    if(a[xx][yy]=='.'&&p==1){
        if(v[xx][yy]==0){
            ans++;
            v[xx][yy]=1;
        }
        dfs(xx,yy,f);
    }
    else {
        p=(f+1)%4;
        dfs(i,j,p);
    }

}
int main(){
    cin>>T;
    while(T--){
        scanf("%d%d%d%d%d%d",&n,&m,&k,&x,&y,&d);
        for(int i=1;i<=n;i++){
            for(int j=1;j<=m;j++){
                cin<<a[i][j];
            }
        }
        dfs(x,y,d);
    }
    return 0;
}

JX-J00018

sticks:括号不配对大佬

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

int a[10] = {6,2,5,5,4,5,6,3,7,6};
int main() {
  //  freopen("sticks.in", "r", stdin);
  //  freopen("sticks.out", "w", stdout);
  int T;
    cin >> T;
    while(T--) {
        int n, ans = INT_MAX;
        cin >> n;
        if(n == 1) cout << "-1\n";
        else if(n == 2) cout << "1\n";
        else if(n == 3) cout << "7\n";
        else if(n == 4) cout << "4\n";
        else if(n == 5) cout << "2\n";
        else if(n == 6) cout << "6\n";
        else if(n == 7) cout << "8\n";
        else if(n == 8) cout << "19\n";
        else if(n == 9) cout << "18\n";
        else{
            cout << "-1\n";
        }


return 0;

}

JX-J00022

chain:运气牢大。

C++
#include <bits/stdc++.h>
#include <time.h>
/*       @-----@
		 [#####]
	      #####
		  #####
		  #####
		  #####
		  #####
		  #####
@		 @#####@        @
[#######################]
[#LUCK WITH YOU FOREVER#]
[#######################]
@		 @#####@        @
		  #####
		  #####
	      #####
		  #####
		  #####
		  #####
		 [#####]
		 @-----@
		 RiP ++
*/
using namespace std;
int t;
int main()
{
	freopen("chain.in", "r", stdin);
	freopen("chain.out", "w", stdout);
	cin >> t;
	srand(time(NULL));
	while(t --)
	{
		int n, k, q;
		int l[100005], s[200005];
		int r[100005], c[100005];
		cin >> n >> k >> q;
		for (int i = 1; i <= n; i ++)
		{
			cin >> l[i];
			for (int j = 1; j <= l[i]; j ++)
			{
				cin >> s[i];
			}
		}
		for (int i = 1; i <= q; i ++)
			cin >> r[i] >> c[i];
		for (int i = 1; i <= q; i ++)
		{
			int ra = random() % 100;//luck ++, rp ++
			if (ra >= 80.114514)
				cout << 1 << endl;
			else
				cout << 0 << endl;	
		}
	}
	return 0;
}

sticks:.out大佬。

JX-J00027

sticks:双引号配对大佬。

C++
...
	for(int i=0;i<=T;i++){
		cout<<"-1""<<endl;
	}
...

JX-J00032

explore:

C++
...
/*
wo bu hui yong scanf a (
qu tong bu de cin you bu tai bao xian
xi wang bu yao yin wei zhe ge bao ling ba :)


*/

翻译:

代码
我不会用 scanf 啊(
去同步的 cin 又不太保险
希望不要因为这个爆零吧 :)

poker:

C++
...
/*
zhe zen mo mei you zhong wen shu ru fa /fn/fn/fn/fn/fn

byd

*/

翻译:

代码
这怎么没有中文输入法 /fn/fn/fn/fn/fn

byd

sticks:

C++
...
/*
zhe ti wo hao xiang jian guo
dan shi wang le zen mo xie :(

wei shen mo shang yi ti wo bu yong while(t--) ne? (

qian mian wang le 
zhong jian wang le
hou mian wang le

xi xi fu mei ma le 

/fn/fn/fn

*/

翻译:

代码
这题我好像见过
但是忘了怎么写 :(
为什么上一题我不用 while(t--) 呢? (
前面忘了
中间忘了
后面忘了
CCF 没 M 了
/fn/fn/fn

2025

马上搞。