跳到正文

个人记录

GZ J组迷惑行为大赏

mi_ho_yo约 6 分钟
原文
文章信息与版本

文章信息

发布
2026年11月11日
收录
2026年11月12日
更新
2026年11月27日
篇幅
约 6 分钟

版本

  1. v2当前
  2. v1

来个迷惑行为大赏,鉴赏一下GZ J组的神人代码。

GZ-J00023

顶级输入输出(and.cpp)

C++
int n,m;
int n[100000]
cin >>n;
int main{
	if(n>=n){
		cout<<n;
	}
	return 0;
}

云斗得分:

GZ-J00035

while(1)里套while(1)(card.cpp, and.cpp)

C++
int n;
	cin>>n;
	while(1)
		while(1)
			while(1)	
				while(1)	
					while(1)
						while(1)
							while(1)
								while(1)
									while(1)
										while(1)
											cout<<n;

云斗得分:

GZ-J00040

兄弟你的freopen格式写对了吗?

travel.cpp

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

string.cpp

代码
    freopen("r","string.in",stdin);
	freopen("w","string.out",stdout);

and.cpp

代码
    freopen("r","and.in",stdin);
	freopen("w","and.out",stdout);

card.cpp

代码
    freopen("r","card.in",stdin);
	freopen("w","card.out",stdout);

云斗得分:

GZ-J00052

试图让CCF知道胡大佬牛福……

所有的文件都有……

and.cpp

代码
//____30分 
//胡大佬牛福!
//Trick||Treat!
//S+J=399 J=254 S=145
/*
	J要被制裁了-------------------------- 
	567267067167067267267067167267167067267067767067167
	去掉67看看呢:胡大佬的sfzh去掉最后一位 
*/

card.cpp

代码
//____24分 
//胡大佬牛福!
//Trick||Treat!
//J+S=400

string.cpp

代码
//9:30AC
//胡大佬牛福!
//Trick||Treat!

travel.cpp

代码
//8:40	正式开考
//9:00	AC
//胡大佬牛福!!

云斗得分:

GZ-J00056

注释掉的fropen(还没写完整?!)

代码
    //freopen("","r","stdin");
	//freopen("","w","stdout");

云斗得分:

GZ-J00062

还是个我们学校的

freopen写在了主函数最后(居然没写在return 0 之后)(所有的程序)

travel.cpp
C++
#include<iostream>
using namespace std;
bool A=false;
bool B=false;
bool C=false;
bool D=false;
int main()
{
	int a,b,x,y;
	char c,z;
	cin>>a>>b>>c>>x>>y>>z;
	if(a == x) A=true;
	if(b == y) B=true;
	if(c-'A'<3 && z-'A'<3 || c-'A'>3 && z-'A'>3) C=true;
	if(c-z == '1' || (c+1)-z == 0) D=true;
	if(A) cout<<'1';
	else 
	{
		cout<<0<<0<<0<<0;
		return 0;
	}
	if(B) cout<<'1';
	else 
	{
		cout<<0<<0<<0;
		return 0;
	}
	if(C) cout<<'1';
	else cout<<'0';
	if(c=='C' && z=='D' || c=='D' && z=='C') cout<<'0';
	else if(D) cout<<'1';
	else cout<<'0';
	freopen("travel.in","r",stdin);
	freopen("travel.out","w",stdout);
	return 0;
}
string.cpp
C++
#include<iostream>
#define ll long long
#include<string>
#include<vector>
using namespace std;
char s[200005];
int main()
{
    ll n,x,i=0,m=0;
    char y;
    cin>>n;
    while(n--)
    {
    	cin>>x>>y;
    	m+=x;
    	for(i;i<=m;i++) s[i]=y;
	}
	ll ans=0;
	for(ll i=1,j=m;i<m/2,j>m/2;i++,j--)
	{
		if(s[i] != s[j]) ans++;
	}
	cout<<ans; 
	freopen("string.in","r",stdin);
	freopen("string.out","w",stdout);
	return 0;
}
and.cpp
C++
#include<iostream>
#define ll long long
int a[200005];
using namespace std;
int main()
{
	ll n,m;
	cin>>n>>m;
	for(int i=1;i<=n;i++) cin>>a[i];
	cout<<a[n];
	freopen("and.in","r",stdin);
	freopen("and.out","w",stdout);
	return 0;
}
card.cpp
C++
#include<iostream>
using namespace std;
int main()
{
	int n,m,a,b,c,d;
	cin>>n>>m>>a>>b>>c>>d;
	if(n=='4'&&m=='3'&&a=='1'&&b=='2'&&c=='1'&&d=='3')
	cout<<3<<" "<<1<<" "<<4;
	freopen("card.in","r",stdin);
	freopen("card.out","w",stdout);
	return 0;
}

云斗得分:

(未写73)98

原文