跳到正文

休闲·娱乐

CSP-S 2025 GX 迷惑行为大赏

aeiouaoeiu约 237 分钟
原文

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

文章信息与版本

文章信息

发布
2025年11月7日
收录
2025年12月12日
更新
2026年10月31日
篇幅
约 237 分钟

版本

  1. v5当前
  2. v4
  3. v3
  4. v2
更早的 1 个版本
  1. v1

今年 CSP-S 2025 广西赛区,共有 ∼660\sim660 人参赛,其中提交文件的选手一共有 653653 位,选手们一共写出了 39843984 个 freopen,8787 个 //freopen,21512151 个 main,33 个 mian(),11 个 fuck,11 个 fking。

今年 CSP-S 2025 广西赛区一等奖分数线为 7676 分,较 2022 年低了 22 分。有分人数 373373 人,占比 56.52%56.52\%,略低于内蒙古。

接下来是具体代码。

部分相似的代码会省略,仅举几个例子。

悔恨终生类

以下错误会使代码一定变为 00 分,请大家铭记在心。

首先是经典的 //freopen 环节!

  • 怎么连文件名都拼错了……
GX-S00091 club.cpp
C++
int main(){
    //freopen("clud.in","r",stdin);
    //freopen("clud.out","w",stdout);
    cin>>t;
  • 不仅 //freopen,还写错了文件名。
GX-S00434 road.cpp
C++
long long t,n,a[200000],b[200000],c[200000],ma=0,z[1000000],q=0,sum=0;
int main()
{
    //freopen("club.in","r",stdin);
    //freopen("club.out","w",stdout);
    cin>>t;
    for(int i=0; i<t; i++)
    {
  • 同上。
GX-S00513 employ.cpp
代码
}

} int main(){ freopen(“employ3.in”,“r”,stdin); //freopen(“employ.out”,“w”,stdout); cin>>n>>m; cin>>s;

这里列出剩下中招的选手,希望大家不要学习

当然这里有一些是删掉注释也加不了分的,但是大家还是不要让自己断绝这一点点希望。

  • GX-S00006:road.cpp、replace.cpp;
  • GX-S00008:club.cpp;
  • GX-S00024:club.cpp;
  • GX-S00081;
  • GX-S00205;
  • GX-S00348;
  • GX-S00391:club.cpp;
  • GX-S00419:employ.cpp;
  • GX-S00423:club.cpp;
  • GX-S00488:employ.cpp;
  • GX-S00489:road.cpp;
  • GX-S00497:club.cpp;
  • GX-S00512:road.cpp;
  • GX-S00525:club.cpp;
  • GX-S00548:replace.cpp、employ.cpp;
  • GX-S00578:club.cpp;
  • GX-S00604:employ.cpp;
  • GX-S00637:club.cpp;
  • GX-S00640:road.cpp;
  • GX-S00649:road.cpp。

除此之外,还有 freopen 缺失的。

  • 这名同学沉住气打了很长的表,但是他忘记 freopen *.out 了。
GX-S00086 employ.cpp
C++
#include<bits/stdc++.h>
#include<iostream>
using namespace std;
//ruguo ni chenbuchuqi nani jiuhui shibai.
int s[501];
int main()

{
	freopen("employ.in","r",stdin);
	freopen("employ.in","w",stdout);
	
	int yes=0;
	int los=0;
	int dag=0;//guomian zongrenshu 
	int n,m;//定义面试人数n 录取人数m
	cin>>n>>m; //输入n和m
	
	// m=0
	if(m==0)
	{
		cout<<"0"<<endl;
		return 0;
	}
	
	int s1;//定义难度字符串
	cin>>s1;//输入难度字符串
	for(int i=n;i>=1;i--)
	{
		s[i]=s1%10;
		s1/=10;
	}
	//存储难度值部分
	
	//m=n
	if(m==n)
	{
		for(int i=1;i<=n;i++)
		{
		if(s[i]==0) 
		{
			cout<<"0"<<endl;
			return 0;
		}
		}
		
			int a=1;
			for(int j=1;j<=n;j++) {a*=j;}
			cout<<a<<endl;
			return 0;
		
	}
	
	int c[n+1];
	for(int i=1;i<=n;i++)
	{
		cin>>c[i];
		//cout<<c[i]<<" ";
	}
	//存储耐心值部分
	//cout<<s[1]<<endl;
	
	//n=1
	if(n==1)
	{
		if(s[1]==1) 
		{
			cout<<"1"<<endl;
			return 0;
		}
		if(s[1]==0) 
		{
			cout<<"0"<<endl;
			return 0;
		}
	}
	
	//n=2
	if(n==2)
	{
		if(s[1]==1&&los<c[1]) yes++;
		else los++;
		if(s[2]==1&&los<c[2]) yes++;
		else los++;
		if(yes>=m) dag++;
		
		yes=0,los=0;
		if(s[1]==1&&los<c[2]) yes++;
		else los++;
		if(s[2]==1&&los<c[1]) yes++;
		else los++;
		if(yes>=m) dag++;
		
		cout<<dag;
	}
	
	//n=3
	if(n==3)
	{
		//123
		if(s[1]==1&&los<c[1]) yes++;
		else los++;
		if(s[2]==1&&los<c[2]) yes++;
		else los++;
		if(s[3]==1&&los<c[3]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//132
		if(s[1]==1&&los<c[1]) yes++;
		else los++;
		if(s[2]==1&&los<c[3]) yes++;
		else los++;
		if(s[3]==1&&los<c[2]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//213
		if(s[1]==1&&los<c[2]) yes++;
		else los++;
		if(s[2]==1&&los<c[1]) yes++;
		else los++;
		if(s[3]==1&&los<c[3]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//231
		if(s[1]==1&&los<c[2]) yes++;
		else los++;
		if(s[2]==1&&los<c[3]) yes++;
		else los++;
		if(s[3]==1&&los<c[1]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//312
		if(s[1]==1&&los<c[3]) yes++;
		else los++;
		if(s[2]==1&&los<c[1]) yes++;
		else los++;
		if(s[3]==1&&los<c[2]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//321
		if(s[1]==1&&los<c[3]) yes++;
		else los++;
		if(s[2]==1&&los<c[2]) yes++;
		else los++;
		if(s[3]==1&&los<c[1]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		cout<<dag<<endl;
	}
	
	//n=4
	if(n==4)
	{
		//1234
		if(s[1]==1&&los<c[1]) yes++;
		else los++;
		if(s[2]==1&&los<c[2]) yes++;
		else los++;
		if(s[3]==1&&los<c[3]) yes++;
		else los++;
		if(s[4]==1&&los<c[4]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//1243
		if(s[1]==1&&los<c[1]) yes++;
		else los++;
		if(s[2]==1&&los<c[2]) yes++;
		else los++;
		if(s[3]==1&&los<c[4]) yes++;
		else los++;
		if(s[4]==1&&los<c[3]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//1324
		if(s[1]==1&&los<c[1]) yes++;
		else los++;
		if(s[2]==1&&los<c[3]) yes++;
		else los++;
		if(s[3]==1&&los<c[2]) yes++;
		else los++;
		if(s[4]==1&&los<c[4]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//1342
		if(s[1]==1&&los<c[1]) yes++;
		else los++;
		if(s[2]==1&&los<c[3]) yes++;
		else los++;
		if(s[3]==1&&los<c[4]) yes++;
		else los++;
		if(s[4]==1&&los<c[2]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//1432
		if(s[1]==1&&los<c[1]) yes++;
		else los++;
		if(s[2]==1&&los<c[4]) yes++;
		else los++;
		if(s[3]==1&&los<c[3]) yes++;
		else los++;
		if(s[4]==1&&los<c[2]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//1423
		if(s[1]==1&&los<c[1]) yes++;
		else los++;
		if(s[2]==1&&los<c[4]) yes++;
		else los++;
		if(s[3]==1&&los<c[2]) yes++;
		else los++;
		if(s[4]==1&&los<c[3]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//2134
		if(s[1]==1&&los<c[2]) yes++;
		else los++;
		if(s[2]==1&&los<c[1]) yes++;
		else los++;
		if(s[3]==1&&los<c[3]) yes++;
		else los++;
		if(s[4]==1&&los<c[4]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//2143
		if(s[1]==1&&los<c[2]) yes++;
		else los++;
		if(s[2]==1&&los<c[1]) yes++;
		else los++;
		if(s[3]==1&&los<c[4]) yes++;
		else los++;
		if(s[4]==1&&los<c[3]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//2314
		if(s[1]==1&&los<c[2]) yes++;
		else los++;
		if(s[2]==1&&los<c[3]) yes++;
		else los++;
		if(s[3]==1&&los<c[1]) yes++;
		else los++;
		if(s[4]==1&&los<c[4]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//2341
		if(s[1]==1&&los<c[2]) yes++;
		else los++;
		if(s[2]==1&&los<c[3]) yes++;
		else los++;
		if(s[3]==1&&los<c[4]) yes++;
		else los++;
		if(s[4]==1&&los<c[1]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//2413
		if(s[1]==1&&los<c[2]) yes++;
		else los++;
		if(s[2]==1&&los<c[4]) yes++;
		else los++;
		if(s[3]==1&&los<c[1]) yes++;
		else los++;
		if(s[4]==1&&los<c[3]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//2431
		if(s[1]==1&&los<c[2]) yes++;
		else los++;
		if(s[2]==1&&los<c[4]) yes++;
		else los++;
		if(s[3]==1&&los<c[3]) yes++;
		else los++;
		if(s[4]==1&&los<c[1]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//3124
		if(s[1]==1&&los<c[3]) yes++;
		else los++;
		if(s[2]==1&&los<c[1]) yes++;
		else los++;
		if(s[3]==1&&los<c[2]) yes++;
		else los++;
		if(s[4]==1&&los<c[4]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//3142
		if(s[1]==1&&los<c[3]) yes++;
		else los++;
		if(s[2]==1&&los<c[1]) yes++;
		else los++;
		if(s[3]==1&&los<c[4]) yes++;
		else los++;
		if(s[4]==1&&los<c[2]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//3214
		if(s[1]==1&&los<c[3]) yes++;
		else los++;
		if(s[2]==1&&los<c[2]) yes++;
		else los++;
		if(s[3]==1&&los<c[1]) yes++;
		else los++;
		if(s[4]==1&&los<c[4]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//3241
		if(s[1]==1&&los<c[3]) yes++;
		else los++;
		if(s[2]==1&&los<c[2]) yes++;
		else los++;
		if(s[3]==1&&los<c[4]) yes++;
		else los++;
		if(s[4]==1&&los<c[1]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//3412
		if(s[1]==1&&los<c[3]) yes++;
		else los++;
		if(s[2]==1&&los<c[4]) yes++;
		else los++;
		if(s[3]==1&&los<c[1]) yes++;
		else los++;
		if(s[4]==1&&los<c[2]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//3421
		if(s[1]==1&&los<c[3]) yes++;
		else los++;
		if(s[2]==1&&los<c[4]) yes++;
		else los++;
		if(s[3]==1&&los<c[2]) yes++;
		else los++;
		if(s[4]==1&&los<c[1]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//4123
		if(s[1]==1&&los<c[4]) yes++;
		else los++;
		if(s[2]==1&&los<c[1]) yes++;
		else los++;
		if(s[3]==1&&los<c[2]) yes++;
		else los++;
		if(s[4]==1&&los<c[3]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//4132
		if(s[1]==1&&los<c[4]) yes++;
		else los++;
		if(s[2]==1&&los<c[1]) yes++;
		else los++;
		if(s[3]==1&&los<c[3]) yes++;
		else los++;
		if(s[4]==1&&los<c[2]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//4213
		if(s[1]==1&&los<c[4]) yes++;
		else los++;
		if(s[2]==1&&los<c[2]) yes++;
		else los++;
		if(s[3]==1&&los<c[1]) yes++;
		else los++;
		if(s[4]==1&&los<c[3]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//4231
		if(s[1]==1&&los<c[4]) yes++;
		else los++;
		if(s[2]==1&&los<c[2]) yes++;
		else los++;
		if(s[3]==1&&los<c[3]) yes++;
		else los++;
		if(s[4]==1&&los<c[1]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//4312
		if(s[1]==1&&los<c[4]) yes++;
		else los++;
		if(s[2]==1&&los<c[3]) yes++;
		else los++;
		if(s[3]==1&&los<c[1]) yes++;
		else los++;
		if(s[4]==1&&los<c[2]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
		//4321
		if(s[1]==1&&los<c[4]) yes++;
		else los++;
		if(s[2]==1&&los<c[3]) yes++;
		else los++;
		if(s[3]==1&&los<c[2]) yes++;
		else los++;
		if(s[4]==1&&los<c[1]) yes++;
		else los++;
		if(yes>=m) dag++;
		yes=0,los=0;
		
	}
	return 0;
}
  • 这名同学把所有的 freopen *.out 都放在了代码结尾。同时除了 employ.cpp,他的所有代码空间都爆炸了。
GX-S00210
C++
#include<bits/stdc++.h>
#include<istream>
using namespace std;
int t,n[100005],sum[100005][100005],adj[100005],my[100005][100005];
int main(){
    freopen("club.in","r",stdin);
    cin>>t;
    for(int i=1;i<=t;i++){
        cin>>n[i];
        for(int j=1;j<=n[i];j++){
            for(int l=1;l<=3;l++){
                cin>>my[j][l];
                if(j!=1&&l!=1){
                    if(my[j][l]>my[j-1][l-1]){
                        my[j][l]=sum[i][j];
                        adj[i]+=sum[i][l];
                        adj[i]=adj[i]+sum[i][j];
                    }
                }
            }
        }
        cout<<adj[i];
    }
    freopen("club.out","w",stdout);
    return 0;
}
其他中招的
  • GX-S00366,除了 club.cpp。
  • GX-S00496,一个文件都没写。
  • GX-S00512,employ.cpp。
  • GX-S00580,employ.cpp。

接下来是一些 freopen 内部的错误。

  • 直接拷过来忘改了。
GX-S00024 employ.cpp
C++
using namespace std;
int main(){
    freopen("replace.in","r",stdin);
    freopen("replace.out","w",stdout);
  • 怎么还把目录放上来了。
GX-S00071

四份代码都是这么写的。

C++
int main()
{
    ios::sync_with_stdio(0);
    cin.tie(0),cout.tie(0);
    freopen("//home//noilinux//club//club.in","r",stdin);
    freopen("//home//noilinux//club//club.out","w",stdout);
    cin>>n;//表示测试数据组数
    for(int u=1;u<=n;u++){
  • .in 对了,.out 错了。
GX-S00008 road.cpp
C++
int main()
{
    freopen("road.in","r",stdin);
    freopen("club.out","w",stdout);
    int n,m,k,h=0;
  • 滚木。
GX-S00009 road.cpp
C++
using namespace std;
int main(){
    freopen("","r",stdin);
    freopen("","w",stdout);
    int a[2] = {2,3};
    sort(a[0],a[0]+2);
  • 测大样例忘改回来了。这个真的丢了 1515 分。
GX-S00130 replace
C++
int ans=0;
int main()
{
   freopen("replace2.in","r",stdin);
   freopen("replace.out","w",stdout);
   scanf("%d%d",&n,&q);
   getchar();
  • 从 .ans 读入是什么,还有这个 it 是什么。
GX-S00346
C++
{
	mement(a,0,sizeof());
int main()
{
    freopen("club.ans","r",stdin);
    freopen("club.in","it",stdout);
    int n;
    cin>>t;
    while(t--)
    {
  • 字符串少写一个双引号,这是怎么做到的。
GX-S00514 employ.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main()
{
	freopen("employ.in,"r",stdin);
	freopen("employ,out","w",stdout);
	cout<<0;
}
  • 后缀怎么消失了。
GX-S00578 road.cpp
C++
using ll = long long;

int main(){
    freopen("road.in","r",stdin);
    freopen("road","w",stdout);
   int a,b,c,d,e,f;
    cin >> a>>b>>c>>d>>e>>f;
    if(a=4){
    cout << "13";
  • .ans 尚且可以理解,但是这个 .write 是不是有点太离谱了。以及空间还爆炸了。
GX-S00272 club.cpp

int main(){ freopen (“club.in”,“w”,stdin); freopen(“club.write”,“r”,stdout); int t,n,a[10000000][10000000],b[10000000],c[1000000],d[10000000],m; int b1,c1,d1,ans ,ans2,ans3; cin>>t; for(int p=1;p<=t;p++){ cin>>n; m=n/2;

  • 文件名打错了。
GX-S00489 employ.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("enpluy.in","r",stdin);
	freopen("empluy.out","w",stdout);
	int x,y;
	string s;
	cin>>x>>y>>s;
	for(int i=1;i<=x;i++){
		int j;
		cin>>j;}
	cout<<"0";
	return 0;}
  • employ.in,但是点没了。
GX-S00660 employ.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int n,m;
string s;
int a[10005];
int main()
{
	freopen("employin","r",stdin);
	freopen("employ.out","w",stdout);
	cin>>n>>m;
	cin>>s;
	for(int i=1;i<=n;i++)cin>>a[i];
	cout<<0;
	return 0;
}
  • in 和 out 消失了。
GX-S00011 employ.cpp
C++
#include<bits/stdc++.h>;
using namespace std;
int main{
    freopen("employ.in","r","std");
    freopen("employ.out","w","std");
  • 这个 siad.in 又是什么东西。
GX-S00216
C++


#include <stdio.h>
using namespace std;
int main(int argc, char **argv)
{
	freopen("club.in" ,"r","siad.in ");
	freopen("club.out" ,"w","siad.out ");
	int a;
	int n;
	int t;
	int m;
	cin>>n;
	for(int i=0;i<=n;i++){
		for(int j=0;j<=3;;j++){
			if(i<=n/2){
				a+=i;
			}
		}
	
	}
	
	
	return 0;

其他中招的同学
  • GX-S00141:club.cpp;
  • GX-S00204;
  • GX-S00274;
  • GX-S00278;
  • GX-S00297;
  • GX-S00344:employ.cpp;
  • GX-S00350;
  • GX-S00351:employ.cpp;
  • GX-S00517:road.cpp;
  • GX-S00537:employ.cpp;
  • GX-S00543:replace.cpp;
  • GX-S00577:road.cpp;
  • GX-S00580:club.cpp、road.cpp;
  • GX-S00583:club.cpp;
  • GX-S00589:road.cpp;
  • GX-S00597:replace.cpp;
  • GX-S00598:empoly.cpp;
  • GX-S00619:除了 replace.cpp;
  • GX-S00621;
  • GX-S00635:road.cpp;
  • GX-S00640:replace.cpp。

接下来是源文件名以及文件夹出错的。重复出现的就不放了。

  • 这位同学提交的是 down 文件夹。
GX-S00346
代码
├─GX-S00346
│  └─down
│      ├─club
│      │      club.cpp
│      │      
│      ├─employ
│      │      employ.cpp
│      │      
│      ├─replace
│      │      replace.cpp
│      │      
│      └─road
│              road.cpp
│              
  • 这么喜欢 poly。
GX-S00598
代码
├─GX-S00598
│  ├─club
│  │      club.cpp
│  │      
│  └─employ
│          empoly.cpp
  • 类似的。
GX-S00337
代码
├─GX-S00337
│  ├─club
│  │      clud.cpp
│  │      
│  ├─employ
│  │      employ.cpp
│  │      
│  ├─replace
│  │      replace.cpp
│  │      
│  └─road
│          road.cpp
  • 怎么做到把文件夹命名为 .cpp 的。
GX-S00428
代码
├─GX-S00428
│  └─club.cpp
│          club.cpp
  • .c++ 是什么。
GX-S00426
代码
├─GX-S00426
│  ├─club
│  │      club.c++
│  │      
│  └─road
│          club.out
│          road
│          road.c++
│          road.o
│          road1.ans
│          road1.in
│          road2.ans
│          road2.in
│          road3.ans
│          road3.in
│          road4.ans
│          road4.in
  • .c++ 尚且还能理解,但是 .CCP 是什么。
GX-S00063
代码
├─GX-S00063
│  ├─club
│  │      club.CCP
│  │      
│  ├─employ
│  │      employ.CCP
│  │      
│  ├─replace
│  │      replace.CCP
│  │      
│  └─road
│          replace.CCP
  • 怎么还有一个后缀名都没有的???
GX-S00365
代码
├─GX-S00365
│  ├─club
│  │      club
│  │      
│  ├─employ
│  │      employ
│  │      
│  ├─replace
│  │      replace
│  │      
│  └─road
│          road
  • 忘记重命名了。
GX-S00390
代码
├─GX-S00390
│  ├─club
│  │      club.cpp
│  │      
│  ├─employ
│  │      Untitled7
│  │      
│  ├─replace
│  └─road
  • 我已经分不清这是故意写错还是什么了。
GX-S00651
代码
├─GX-S00651
│  ├─club
│  │      club.cpp
│  │      
│  ├─employ
│  │      empioy.cpp
│  │      
│  ├─replace
│  │      replace.cpp
│  │      
│  └─road
│          road3.cpp
  • 怎么还有交 J 组代码的。
GX-S00118
代码
├─GX-S00118
│  ├─number
│  │      number.cpp
│  │      
│  ├─polygon
│  │      polygon.cpp
│  │      
│  ├─seat
│  │      seat.cpp
│  │      
│  └─xor
│          xor.cpp

接下来是各种 CE。

  • using namepsace 还能粘一块的。
GX-S00651
C++
#include <stdio.h>
usingnamespace std;
int main(int argc, char **argv){
	
	
	
	
	
	
	
	
	
	
	
	
	
	return 0;
}
  • 写 Python 写多了。
GX-S00011 employ.cpp
C++
#include<bits/stdc++.h>;
using namespace std;
int main{
    freopen("employ.in","r","std");
    freopen("employ.out","w","std");
    int n;
    p = [];
    return 0;
}
  • froepen 单独写外面,using namespace;,还有其他的问题。

  • 同时 GX-S00616 也犯了同样的错误。

GX-S00076
C++
#include<bits/stdc++.h>
using namespace;
freopen("club.in","r",stdin);
freopen("club.out","w",stdout);
int m,t,n,a[3][100003],b[200003],n[3],l,min,h,d;
double an;
fool f;
int main(){
	cin>>t;
	for(;t>0;t--){
		cin>>n;
		u=n;
		n/=2;
		for(int m=u;m>0;m--){
			cin>>a[0][m]>>a[1][m]>>a[2][m];
			int z=max(a[0][m],a[1][m],a[2][m]);
			if(f){
				if(a[l][m]!=z) an+=z
				else{
					int p=max(a[h][m],a[d][m])
					if(min>z) an+=p;
					else{
						p=z-p;
						an=an+z-min;
						a[l][p]++;
						for(int i=0;i<p,i++){
							if(a[l][i]) min=i;
							break;
						}
					}
				}
			}
			else {
				an+=z;
				if(a[0][m]==z){
					an+=a[0][m];
					n[0]++;
					if(n[0]==n){
						f=ture;
						l=0;
						h=1;
						d=2;
					}
				}
				else if(a[1][m]==z){
					an+=a[1][m];
					n[1]++;
					if(n[1]==n){
						f=ture;
						l=1;
						h=0;
						d=2;
					}
				}
				else{
					an+=a[2][m];
					n[2]++;
					if(n[2]==n){
						f=ture;
						l=2;
						h=1;
						d=0;
					}
				}
			if(f){
				for(int i=u;i>=n;i--){
					if(max(a[l][i]==max(a[l][i],a[h][i],a[d][i])){
						b[a[l][i]-a[h][i]]++;
						b[a[l][i]-a[d][i]]++;
					}
				}
				for(int i=0;i<2000000;i++){
					if(b[i]){
						min=b[i];
						break;
					}
				}
			}
			}
		}
		cout<<an;
	}
}

注意到这里花括号还没有匹配。

  • 这个是不是也是 Python 写多了。
GX-S00281 club.cpp
C++
double m;
int a,b,c;
int x=0,y[5]=[0,0,0,0,0];
int main()
{cin>>n;
  • 唐突出现的下划线。
GX-S00363 replace.cpp
C++
#include <bits/stdc++.h>
using namespace std;

int main() {
	freopen("replace.in", "r", stdin);
	freopen("replace.out", "w", stdout);
	return 0;_
}
  • reopen。
GX-S00482 employ.cpp
C++
#include<bits/stdc++.h>
using namespace std;
string s;
int n,m,a[510],f,ans;
int main(){
    freopen("employ.in","r",stdin);
    reopen("employ.out","w",stdout);
    cin>>n>>m;
    cin>>s;
    for(int i=1;i<=n;i++){
        cin>>a[i];
        if(a[i]>0) f++;
    }
    for(int i=1;i<=n;i++){
        ans+=i;
    }
    cout<<ans%998244353;
    return 0;
}
  • stdin 当 freopen 用。
GX-S00342
C++
		}
	}
}
int main(){
	stdin(club.in,'w',stdin);
	stdout(club.out,'r',stdout);
	cin>>t;
	int g[t],y=0;
	for(int i=0;i<t;i++){
		cin>>n;
  • 2n。
GX-S00512 employ.cpp
C++
#include <iostream>
using namespace std;
int main(){
    int n,m,s;
    cin>>n>>m;
    for(int i=0;i<2n;i++){
        cin>>s;
    }
    cout<<'2';
    return 0;
}
  • 怎么做到把 "*.in" 和 "r" 粘一起的。
GX-S00568
C++
int t,n;
int main()
{
    freopen("club.in""r",stdin);
    freopen("club.out""w",stdout);

    cin>>t;
  • 数组大小 1e9,经测试不能使用浮点数作数组大小。
GX-S00574 road.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("road.in","r",stdin);
    freopen("road.out","w",stdout);
    int m,n,k;
    int u[n],v[n],w[1e9];
    cin>>n>>m>>k;
    for(int i=0;i<m;i++){
        cin>>u[i]>>v[i]>>w[i];
    }
    return 0;
}
  • dits/stdc++.h。
GX-S00140
C++
#include<dits/stdc++.h>
using namespace std:
int main(){
    freopen(club.in,r,stdin)
    freopen(club.out,w,stdout)
    int a,b;
    cin>>a>>b;
    cout<<a<<b;
    return 0;
}
  • continue; 后面怎么有个数字。
GX-S00582
C++
		}
		if (zero){
			sort (a+1,a+1+n);
			for (int i=n;i>n/2;i--) ans+=a[i];
			cout << ans<< endl;
			continue;4
		}
		else {
			ans=0;
			for(int i=1;i<=n;i++) ans+=max(max(a[i],b[i]),c[i]);
			cout << ans<< endl;
			
	}
	return 0;
}

接下来是 MLE 的,不知道为什么那么多人。

MLE
  • GX-S00046:club.cpp;
  • GX-S00122;
  • GX-S00210;
  • GX-S00217;
  • GX-S00376:club.cpp、road.cpp;
  • GX-S00383:road.cpp;
  • GX-S00418:road.cpp;
  • GX-S00432:road.cpp;
  • GX-S00545:road.cpp;
  • GX-S00566:road.cpp;
  • GX-S00659:club.cpp。

自我介绍类

下面是各种各样的自我介绍。

  • gaogao05:先使用 //freopen 勾引,然后再自我介绍。
GX-S00606 employ.cpp
C++
    for(int i=1;i<=n;i++){
        cin>>c[i];
    }
    //freopen(".in","r",stdin);
    //freopen(".out","w",stdout);
    dfs(0,0);
    cout<<ans;
    return 0;
}
//freopen stwout Nevergonnagive you up
//my luogu name is gaogao05.
  • JadeFox2012。
GX-00019
C++
//my names in Luogu is JadeFox2012
  • Chengsinuo。
GX-S00371
C++
/*
CSP-S 2025
Chengsinuo
GX-S00371
T1 club.cpp
*/
  • Otaku。
GX-S00424 club.cpp
C++
constexpr int N = 1e5 + 514;

namespace Otaku {
    int n, ans, cnt;
    int A, B, C, val[N][4];
    int vis[N];
  • anbeniya。
GX-S00212 club.cpp
C++
struct anbeniya{
    int mx,se,ed;
    int s1,s2,s3;
    int sum;
}awa[maxn];

bool cmp1(anbeniya x,anbeniya y){
    if(x.mx==y.mx){
        if(x.se==y.se) return x.ed>y.ed;
        else return x.se>y.se;
    }
    else return x.mx>y.mx;
}
  • Birds_int_he_sky。
GX-S00613 club.cpp
C++
 * Luogu UID:819326
 * 2025/11/01
  • CHmobei123。
GX-S00631 road.cpp
C++
    if(n==0&&m==0&&k==0)
    {
        cout<<8745789342875784592347532<<"ejhfojkhfasjhfij4ihjmieuchg9wuhgkekejncm9qghnv5uq7 h84vm4uiowhiot ht9wyt9whtowhtow ";
    }
    if(PCL[1]==10101001)
    {
        cout<<"Minecraft is a good game.First the stranger is 'Hypixel',the IPv4 is 'Hypixel.net',but Hypixel is need to pay 89 dolor to the minecraft.net to shopping.It is so difficult "<<endl;
        cout<<"So a China employ pay the 20000000 dolor to shop the China minecraft.2020 the employ creative 'bujidao',it a good play game the 'bujidao'IPv4 is 'bujidao.net'"<<endl;
        cout<<"All in all,minecraft lancher is so difficult,so the longtengmaoyue creative Plain Craft Lancher it name PCL so cool!";
    }
    if(PCL[n]==2009)
    {
        cout<<"Oh you maybe search a egg!";
        cout<<endl<<"Minecraft was creat 2009.The creater is Norch and MoJang.MoJang is more people";
        cout<<endl<<"All in all,I like minecraft.I like PCL.I like life.";
    }
    if(PCL[n-1]==1012)
    {
        cout<<"lalala wo shi cai dan wo xi huan wan MC wo MC de zheng ban zhang hao ming cheng jiao CHmobei123 duan kou hao shi jp.frp:16121,wo zui jing xi huan wan chun sheng cun dang ran you shi hou wo hui wan Hypixel you shi wan 2b2t.org huo zhe 2b2t.xin yi qi wan ma?ovo";
    }
    if(w==1)
    {
        cout<<"heirjowhgi435uh8i45h43u2hgiou4rh3iogh29uhg9803h49tg8j95ht9h25g795f93fh8fh823hfiuo2hjnregnifoi5ghio5uhoi24uhgu5ghgo2ihg2ui5hgi4u5";
    }
    if(w==84)
    {
        cout<<54188;
    }
    if(w==78)
    {
        cout<<18813818878;
    }
    if(w==2009)
    {
        cout<<"ni zhi dao ma an zhu w+Ctrl ke yi ji pao dan shi wo xi guan yong w+r lai kong zhi ji pao";
        cout<<"lalalalalalalala kulikulikulikuli lalalalalalalala yiqinahancangtiandadi zhejiushiwomendekuli jishudingjiandekuli";
        cout<<"huilaibaminishijie wozuijiaoaodexinyang lilizaimudekaka yanleimomingzailiutang yixijidehuaxiaolou haiyoukeaidenini badirendoudatui wandaotongxiaoyebulei";
    }
  • Ff472130。
GX-S00318
C++
#define qwq Ff472130

心路历程&整活&各种奇奇怪怪的行为类

  • qwq。
GX-S00271 road.cpp
C++
    cout <<ans;
    //solution1();
    //qwq
    return 0;
}
  • 对 CCF 求情以得到 100100 分;对 NOIP 的渴望;不可以总司令能在出现一次吗?
GX-S00019
C++
//I Love CCF.I Want 100pts in this problem!

//I only have 172pts,can i go to NOIP(sad)?i want to go it!
//bu ke yi zong si ling neng zai chu xian yi ci ma?
  • 乐 →\to 不乐。
GX-S00016
代码
File: D:\22112\CSP-S2025 GX\GX-S00016\club\club.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00016\club\club.cpp
------------------------------------------
Single Comments:
  [Line 3]: // Love Try My Best

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00016\employ\employ.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00016\employ\employ.cpp
------------------------------------------
Single Comments:
  [Line 3]: // I'M NOOB

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00016\replace\replace.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00016\replace\replace.cpp
------------------------------------------
Single Comments:
  [Line 3]: // ICANTDOTHAT

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00016\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00016\road\road.cpp
------------------------------------------
Single Comments:
  [Line 3]: // EZ NOOB
  • 最用心写的一个、最用心写的第二个、少羽牛逼,还有一个没读懂。
GX-S00135
C++
==========================================
File: D:\22112\CSP-S2025 GX\GX-S00135\club\club.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00135\club\club.cpp
------------------------------------------
Single Comments:
  [Line 36]: //        for(int i=1;i<=n;i++)
  [Line 37]: //        {
  [Line 38]: //            cout<<st[i].a[1]<<st[i].a[2]<<st[i].a[3]<<endl;
  [Line 39]: //        }
  [Line 51]: //            cout<<st[i].b[bj]<<" "<<bj<<"  "<<sum<<endl;
  [Line 56]: //                cout<<st[i].b[bj]<<" "<<bj<<"  "<<sum<<endl;
  [Line 57]: //                    for(int j=1;j<=3;j++) cout<<cnt[j]<<" ";
  [Line 58]: //                    cout<<endl;
  [Line 71]: //                cout<<st[i].b[bj]<<" "<<bj<<"  "<<sum<<endl;
  [Line 76]: //                    cout<<st[i].b[bj]<<" "<<bj<<"  "<<sum<<endl;
  [Line 77]: //                    for(int j=1;j<=3;j++) cout<<cnt[j]<<" ";
  [Line 78]: //                    cout<<endl;
  [Line 96]: //zuei yuong xin xie de yi ge
  [Line 97]: //55

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00135\employ\employ.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00135\employ\employ.cpp
------------------------------------------
Single Comments:
  [Line 61]: //zuei yuong xin xie de di er ge
  [Line 62]: //55

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00135\replace\replace.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00135\replace\replace.cpp
------------------------------------------
Single Comments:
  [Line 10]: //shao yu niu bi
  [Line 11]: //55

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00135\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00135\road\road.cpp
------------------------------------------
Single Comments:
  [Line 10]: //codm hui tiao bp50
  [Line 11]: //55
  • 喜欢玩游戏。
GX-S00139
代码
File: D:\22112\CSP-S2025 GX\GX-S00139\employ\employ.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00139\employ\employ.cpp
------------------------------------------
Single Comments:
  [Line 10]: //Just do it!
  [Line 11]: //It is too difficult to me!
  [Line 12]: //So I do not want to do it any more!
  [Line 13]: //I want to play the Star Rail
  [Line 14]: //If I can not AK I will play GXXXX Impact
  [Line 15]: //And I will play the Count Strike 2
  [Line 16]: //Thanks for your listening!
...
  [Line 289]: //Just do it!
  [Line 290]: //It is too difficult to me!
  [Line 291]: //So I do not want to do it any more!
  [Line 292]: //I want to play the Star Rail
  [Line 293]: //If I can not AK I will play GXXXX Impact
  [Line 294]: //And I will play the Count Strike 2
  [Line 295]: //Thanks for your listening!

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00139\replace\replace.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00139\replace\replace.cpp
------------------------------------------
Single Comments:
  [Line 10]: //Just do it!
  [Line 11]: //It is too difficult to me!
  [Line 12]: //So I do not want to do it any more!
  [Line 13]: //I want to play the Star Rail
  [Line 14]: //If I can not AK I will play GXXXX Impact
  [Line 15]: //And I will play the Count Strike 2
  [Line 16]: //Thanks for your listening!
  [Line 19]: //Just do it!
  [Line 20]: //It is too difficult to me!
  [Line 21]: //So I do not want to do it any more!
  [Line 22]: //I want to play the Star Rail
  [Line 23]: //If I can not AK I will play GXXXX Impact
  [Line 24]: //And I will play the Count Strike 2
  [Line 25]: //Thanks for your listening!
  [Line 27]: //Just do it!
  [Line 28]: //It is too difficult to me!
  [Line 29]: //So I do not want to do it any more!
  [Line 30]: //I want to play the Star Rail
  [Line 31]: //If I can not AK I will play GXXXX Impact
  [Line 32]: //And I will play the Count Strike 2
  [Line 33]: //Thanks for your listening!
...
  [Line 289]: //Just do it!
  [Line 290]: //It is too difficult to me!
  [Line 291]: //So I do not want to do it any more!
  [Line 292]: //I want to play the Star Rail
  [Line 293]: //If I can not AK I will play GXXXX Impact
  [Line 294]: //And I will play the Count Strike 2
  [Line 295]: //Thanks for your listening!
  • 唱歌。怎么没唱完。
GX-S00149
C++
//I'm always knew where I stood,I try to be so good.
//Look at me now,I don't know how,but I'm real hero.
//No hiding in the 
  • 怎么看出 T4 是费用流板子的。
GX-S00167 employ.cpp
C++
#include<bits/stdc++.h>
using namespace std;
//fei yong liu mu ban 48
struct Node{
    int to, nxt, w;
}e[100010];
  • 伟大的心路历程,以及恭喜拿到七勾。
GX-S00169
代码
==========================================
File: D:\22112\CSP-S2025 GX\GX-S00169\club\club.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00169\club\club.cpp
------------------------------------------
Multi Comments:
/*
froepen

zhe sha a?????
wo zen me bu hui T1
fa xian B = zheng jie???
nononono
oh no
wo yao fei le???????????
wo bu hui mei qu nian gao ba
/fn/fn/fn/fn/fn/fn/fn/fn/fn/fn/fn
wo yao na gou 7!!!!!!!!!!!!!!!!!!
xiang xin wo bu hui de bie ren ye bu hui
qwq

70+72+50+24=216

plzplzplzplzplzplzplzplzplzplz

rang wo na gou 7 ba qwq

*/

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00169\employ\employ.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00169\employ\employ.cpp
------------------------------------------
Multi Comments:
/*
hyw
he yi wei
?????????????
qwq
qwq
qwq
qwq
qwq
qwq
qwq
*/

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00169\replace\replace.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00169\replace\replace.cpp
------------------------------------------
Multi Comments:
/*
hyw
he yi wei
?????????????
qwq
qwq
qwq
qwq
qwq
qwq
qwq
*/

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00169\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00169\road\road.cpp
------------------------------------------
Multi Comments:
/*
wo zen me bu hui t1????
t2 kan zhe xiang mst

???????
how
wo gan jue wo yao fei le
/ll/ll/ll/ll

hrgf;gr;ehgersou;hgesr
ffffffff
*/
  • 🗿🗿🗿。
GX-S00201
C++
#include<bits/stdc++.h>
using namespace std;
const int N=10000086;
int main(){
    freopen("club.in","r",stdin);
    freopen("club.out","w",stdout);
    int t;
    cin>>t;
    while(t--){
        int n;
        cin>>n;
        for(int i=1;i<=n;i++){
            for(int y=1;y<=3;y++){
                int a1,a2,a3;
                cin>>a1>>a2>>a3;
            }
        }
    }
    return 0;//bro know me?🗿🗿🗿
}
  • 背诵岳阳楼记、醉翁亭记,真是好学生。
GX-S00288
C++
/*
zui weng ting ji
ou yang xiu
hcjsy,qxnzf,lhymwzwresxz,lyy.sxlql,jwsscc,excylfzjz,nqy.fhlz,ytyrlyqsz,zwty.ztzs?szszxy;mzzs?tszwy.tsyklyyc,yszz,enyzq,ggzhy:"zw"y.zwzybzj,zhsszjy,sszl,dzyeyzjy
rfrceyfk,ygeyxm.hmbhz,sjzzmy,yffeyx,jmxefy,ssgj,slesc,zjzssy.zew,meg,sizjbt,elywqy.
zyfzgyt,xzxys,qzh,hzy.lytx,wlebjz,cryy.lxey,xseyf;nqwj,qxejl.syys,zreqcz,tsyy.yhzl,fsfz,tzs,yzz,gcjc,zbhy.qzcybf,trhqjz,tszy.
yexyzs,rxsl,tsgebkcy.slyy,mssx,yygeqnly.eqnzslzl,bzrzl.rzctsyel,ebztszlqly.zntql,xnsywz,tsws?lu lin ou yang xiu ye.
*/
C++
/*
yue yang lou ji
fan zhong yan
qlsnc,tzjzsblj.ymn,ztrh,bfjx,ncxyyl.zqjz,ktxjnsfyqs,zyzwyjz
ygfblsz,zdtyh.xys,tcj,hhss,hwjy.zhxy,qxwq,czyylzdgy,qrzsby.rzbtwx,njxx,qksr,dhyc,lwzq,dwyh
rfyyff,lybk,yfnh,zlpk,rxyy,syqx,slbx,qqjc.bmmmhxyt.dsly,zyqghx,ycwj,mmxr,gjebzy
zrchjm,blbj,xxtg,ybwq,soxj,jlyy,aztl,yyqq.ehcyyk,hyql,fgyj,jycb.dsly,zyxksy,crxw,bjlf,qxyyzy.
jh!ycqgrrzx,hycezw,hz?bywx,byjb,jmtzgzyqj,cjhzyzyqm.sjyy,tyy,rzhsely?qby:"xtxzyey,htxzlel.'h.wsr,wsyg?slnjyswr.
*/
  • 我能拿二等吗。
GX-S00341
C++
//wo yao shang 2 deng awa
  • 切 T1 的选手就是自信!
GX-S00424 club.cpp
C++
// 16.18 finished I am sick
  • 禁三警告。
GX-S00444 club.cpp
C++
						ans-=c[i].cost;
						top[k]--;
					}
					i++;
				}
				break;
			}
			
		}
		printf("%d\n",ans);
	}
	return 0;
}



// it fking hard!
  • 这个我不是很懂。
GX-S00472
C++
}
//Z-9
//Zhao
  • 试图在考场上睡觉,但是失败了。
GX-S00490
C++
	//16:29 rp++++++++++++++
	//16:51 i will sleep 2 hour good luck!
	//16:55 i can not sleep
	//18:23 rp++++++++++++++
  • T2 被卡常了。预先把所有边排一遍是不是就可以了呢。
GX-S00571 road.cpp
C++
// my program has a big problem???
// O mlogm+n*2^k*logn bu neng guo qu
// shi ben di ji zi tai man le
// hai shi stl tai man le
  • ohnonononono。
GX-S00608 road.cpp
C++
    }*/
}
signed main(){
    freopen("road.in","r",stdin);
    freopen("road.out","w",stdout);
    //ohnonononono
    scanf("%lld%lld%lld",&n,&m,&k);
    for(int i=1,u,v,w;i<=n;i++){
        scanf("%lld%lld%lld",&u,&v,&w);
        e.push_back({u,v,w});
    }
  • 禁三警告 ×2\times 2。
GX-S00639 club.cpp
C++
				maxt+=a[i].a1;
			}
		}
		//fuck from here
		else if(yousan){
			maxt=0;one=0;two=0;
			sort(a+1,a+n+1,cmp1);
  • 搏一搏,单车变摩托。
GX-S00655 road.cpp
C++
   //boyibo,danchebianmotuo
    if(n==4){
        cout<<13;
        return 0;
    }
    if(n==1000&&k==5){
        cout<<505585650;
        return 0;
    }
    if(n==1000&&k==10&&u[1]==709){
        cout<<504898585;
        return 0;
    }
    if(n==1000&&k==10&&u[1]==711){
        cout<<5182974424;
        return 0;
    }
  • 自我总结,希望他再接再厉。
GX-S00657 club.cpp
C++
/*
I tried my best......
T1 :I know how to do but I forgot how to use operator
T2 :I can only get the first 4 points
T3 :It is too hard for me
T4 :Hard ,too
Maybe I should go back for whk
*/
  • Hello World!
GX-S00007 employ.cpp
C++
#include <bits/stdc++.h>
#define IOFILE "employ"

using namespace std;

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

    cout << "Hello World!" << endl;
    return 0;
}
  • 大起大落。
GX-S00055 employ.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("employ.in","r",stdin);
	freopen("employ.out","w",stdout);
	while(true){
		cout<<"YES!!!!!!!!!!!!!!!";
	}
	return 0;
}
GX-S00055 replace.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	while(true){
		cout<<"NO!!!!!!!!!!!!!!!";
	}
	return 0;
}
  • 哈基米。
GX-S00361
C++
#include <bits/stdc++.h>
#define MAXN 100010
#define HAJIMINANBEILVDOU 0
using namespace std;
int a[MAXN],b[MAXN],c[MAXN];
typedef struct ffff{
    int aa;
    int bb;
  • 题目锐评。
GX-S00394
代码
==========================================
File: D:\22112\CSP-S2025 GX\GX-S00394\club\club.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00394\club\club.cpp
------------------------------------------
Single Comments:
  [Line 57]: if(s[1]<nn){//1 a
  [Line 66]: if(s[2]<nn){//2 b
  [Line 75]: if(s[3]<nn){//3 c

Multi Comments:
/*
1s
512

eazy back-way greedy
*/

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00394\employ\employ.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00394\employ\employ.cpp
------------------------------------------
Single Comments:
  [Line 59]: // cin>>T;

Multi Comments:
/*
1s
512

horrible counting problem
*/

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00394\replace\replace.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00394\replace\replace.cpp
------------------------------------------
Single Comments:
  [Line 51]: // cin>>T;

Multi Comments:
/*
1s
2048

I pay little time on the strings' algorithm, so here comes the result.
*/

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00394\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00394\road\road.cpp
------------------------------------------
Single Comments:
  [Line 77]: // cin>>T;

Multi Comments:
/*
1s
512

1e9 per second
*/
  • 骗分创奇迹,打表出省一。
GX-S00398 club.cpp
C++
#include<iostream>  //pianfen chuang qiji dabiao chu shengyi
  • 不会写。以及另一个 helloworld。
GX-S00482 replace.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("replace.in","r",stdin);
    freopen("replace.out","w",stdout);
    cout<<"I don't know how to write"<<endl;
    return 0;
}
GX-S00482 road.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("road.in","r",stdin);
    freopen("road.out","w",stdout);
    cout<<"Hello World"<<endl;
    return 0;
}
  • 万元申万的。
GX-S00484
C++
struct kafka
{
    int y,e,s,max1,max2,max3;
    bool sf;
};
struct hutao
{
    int c1,c2,c3;
};
bool cmp(kafka a,kafka b)
{
    return a.max1<b.max1;
}
int main()
  • 这个会玩。各种有意思的 #define。
GX-S00539 road.cpp
C++
#include<bits/stdc++.h>
#define CCF using
#define Colect_Many namespace
#define Coins std;
#define TenYearsOIisEmpty long long
#define NoLongLongSeeGrandGrandParents long long
#define IdieTrue cin
#define FlashingChen struct
#define XiaoMi bool
#define IdontWantToBeZerowuwu freopen("road.in","r",stdin);
#define IdontWantToBeZerowuwuwu freopen("road.out","w",stdout);
#define PissInto push_back
#define OhMyGod break;
#define NotTrue false
#define NotFalse true
#define Ture false
CCF Colect_Many Coins
vector<TenYearsOIisEmpty>g[10004];
FlashingChen node{
    TenYearsOIisEmpty u,v,w;
}a[10004];
TenYearsOIisEmpty n,m;
NoLongLongSeeGrandGrandParents k;
XiaoMi check(){
    XiaoMi vis[10004];
    queue<TenYearsOIisEmpty>q;
    q.push(1);
    vis[1]=NotFalse;
    while(!q.empty()){
        TenYearsOIisEmpty frt=q.front();q.pop();
        for(TenYearsOIisEmpty i=0;i<g[frt].size();i++){
            if(vis[g[frt][i]]) continue;
            vis[g[frt][i]]=NotFalse;
            q.push(g[frt][i]);
        }
    }
    for(TenYearsOIisEmpty i=1;i<=n;i++){
        if(!vis[i]) return NotTrue;
    }
    return NotFalse;
}
XiaoMi cmp(node a,node b){
    return a.w<b.w;
}
signed main(){
    IdontWantToBeZerowuwu
    IdontWantToBeZerowuwuwu
    IdieTrue>>n>>m>>k;
    for(TenYearsOIisEmpty i=1;i<=m;i++){
        IdieTrue>>a[i].u>>a[i].v>>a[i].w;
    }
    sort(a+1,a+1+m,cmp);
    XiaoMi flag=NotTrue;
    TenYearsOIisEmpty cnt=0,sum=0;
    while(Ture){
        cout<<"I love OI?"<<endl;
    }
    while(flag==NotTrue){
        flag=check();
        if(flag) OhMyGod;
        g[a[++cnt].v].PissInto(a[cnt].u);
        g[a[cnt].u].PissInto(a[cnt].v);
        sum+=a[cnt].w;
    }
    cout<<sum;
    return 0;
}
  • 可爱。
GX-S00573 employ.cpp
C++
		ui die = 0;
		//cout << "moni...\n";
		//for (ui i = 1; i <= n; ++i) cout << a[i] << " ";
		//cout << '\n';
		for (ui i = 1; i <= n; ++i) {
			ui p = a[i];
			ui cc = c[p];
			if (die >= cc) {
				++die;
				//cout << p << " has died ;-;\n";
				continue;
			}
			if (s[i] == '0') {
				++die;
				//cout << p << " has died ;-;\n";
				continue;
			}
			++res;
		}
		//cout << "moni end!\n";
		if (res >= m) ++ans;
  • original 拼错了。
GX-S00592 road.cpp
C++
#include<bits/stdc++.h>
using namespace std;
#define ll long long

void pre(){
    freopen("road.in","r",stdin);
    freopen("road.out","w",stdout);
}

int main(){

    pre();
    init();
    prim();//a oringe map

    cout<<ans<<endl;

    return 0;
}
  • 211985,521211985,521,以及一些不知道是不是有特殊含义的三字母。
GX-S00601 club.cpp
C++
#define int long long
const int N=211985;
const int M=1000000007;
using namespace std;
char cvb;
int re()
{
	int dfg=0,fgh=1;
	cvb=getchar();
	while(cvb>'9'||cvb<'0')
	{
		if(cvb=='-') fgh=-1;
	cvb=getchar();
		}
	while(cvb>='0'&&cvb<='9')
	{
		dfg=(dfg<<1)+(dfg<<3)+cvb-'0';
	cvb=getchar();
		}
	return dfg*fgh;
}
int n,b[4],T,q,t[4],ans;
struct jg
{
	int val,x;
}a[N];
bool gz(jg xx1,jg xx2) {return xx1.val<xx2.val;}
signed main()
GX-S00601 employ.cpp
C++
#include<cstdlib>
#define int long long
const int N=521;
const int M=998244353;
using namespace std;
char cvb;
  • 碎碎念、发病、唱歌。
GX-S00613
C++
/*
 * 初三了,打完这场CSP就去备考了。要是考不上有OI训练营的高中就真的AFO了……
 * 估分35pts,这题大概是DP但我不会写(悲
 * 求进迷惑行为大赏
 * 我是温迪的狗!!!
 * 我是温迪的狗!!!
 * 我是温迪的狗!!!
 * 我是温迪的狗!!!
 * 我是温迪的狗!!!
 * 我是温迪的狗!!!
 * 我是温迪的狗!!!
 * 我是温迪的狗!!!
 * 我是温迪的狗!!!
 * 我是温迪的狗!!!
 * 
 * 《风与飞鸟》
 * 传说那阳光
 * 沐浴万物生长
 * 而我抬头
 * 风沙万丈
 * 
 * 在那背后
 * 是怎样的蓝天
 * 一墙之隔
 * 一生之所向
 * 
 * 陌生的精灵
 * 听到这琴声吗
 * 随我歌唱
 * 带我远洋
 * 
 * 再小的希望
 * 能像花一样尽情绽放
 * 迎接朝阳
 * 
 * 不安的音符跳动着
 * 在心中鸣响乐章
 * 没有人能困住灵魂
 * 站起身伸出翅膀
 * 
 * (这段忘了)
 * 
 * 顷刻间意志
 * 如同熊熊烈火
 * 看它燎原
 * 肆意盘旋
 * 
 * 迷途的人们
 * 别再遮蔽双眼
 * 迎向逆风
 * 怒视深渊
 * 
 * 随着我自由地高歌
 * 回荡在塔顶漩涡
 * 在王座崩落的一刻
 * 我看见天的颜色
 * 
 * ……后面忘了
 * (666高潮部分全忘了,记性真好)
 * ……前面忘了
 * 
 * 传说那阳光
 * 沐浴万物生长
 * 风与飞鸟
 * 自由飞翔
 * 
 * Luogu UID:819326
 * 2025/11/01
*/
  • GXOI。
GX-S00638
C++
#define GXOI ioxg
  • 不知道是什么的暴力。
GX-S00270 club.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("club.in","r",stdin);
    freopen("club.out","w",stdout);
    long long a;
    cin>>a;
    for(int i=0;i<a;i++){
        int t=0;
        cin>>t;
        if(t==2){
            int p1,p2,p3,p4,p5,p6;
            cin>>p1>>p2>>p3>>p4>>p5>>p6;
            cout<<max(p1+p5,max(p1+p6,max(p2+p6,max(p2+p4,max(p3+p4,p3+p5)))))<<endl;
        }else if(t==4){
            int ll[12]={0};
            for(int ii=1;ii<=12;ii++){
                cin>>ll[ii];
            }
            long long d=0;
            for(int i1=1;i1<=3;i1++){
                    for(int j=1;j<=3;j++){
                        for(int k=1;k<=3;k++){
                            for(int ss=1;ss<=3;ss++){
                                    int y=0,e=0,s=0;
                                if(i1==1){
                                    y++;
                                }
                                if(j==1){
                                    y++;
                                }
                                if(k==1){
                                    y++;
                                }
                                if(ss==1){
                                    y++;
                                }
                                if(i1==2){
                                    e++;
                                }
                                if(j==2){
                                    e++;
                                }
                                if(k==2){
                                    e++;
                                }
                                if(ss==2){
                                    e++;
                                }

                                if(i1==3){
                                    s++;
                                }
                                if(j==3){
                                    s++;
                                }
                                if(k==3){
                                    s++;
                                }
                                if(ss==3){
                                    s++;
                                }
                                if(y<=2&&e<=2&&s<=2){
                                    if((ll[i1]+ll[j+3]+ll[k+6]+ll[ss+9])>d){
                                        d=ll[i1]+ll[j+3]+ll[k+6]+ll[ss+9];
                                    }
                                }
                        }
                    }
            }
            }
            cout<<d<<endl;
        }


        else if(t==10){
            int ll[30]={0};
            for(int ii=1;ii<=30;ii++){
                cin>>ll[ii];
            }
            long long d=0;
            for(int i1=1;i1<=3;i1++){
               for(int i2=1;i2<=3;i2++){
                    for(int i3=1;i3<=3;i3++){
                    for(int i4=1;i4<=3;i4++){
                    for(int i5=1;i5<=3;i5++){
                    for(int i6=1;i6<=3;i6++){
                    for(int i7=1;i7<=3;i7++){
                    for(int i8=1;i8<=3;i8++){
                    for(int i9=1;i9<=3;i9++){
                    for(int i10=1;i10<=3;i10++){
                            int y=0,e=0,s=0;
                    if(i1==1){
                        y++;
                    }
                    if(i2==1){
                        y++;
                    }
                    if(i3==1){
                        y++;
                    }
                    if(i4==1){
                        y++;
                    }
                    if(i5==1){
                        y++;
                    }
                    if(i6==1){
                        y++;
                    }
                    if(i7==1){
                        y++;
                    }
                    if(i8==1){
                        y++;
                    }
                    if(i9==1){
                        y++;
                    }
                    if(i10==1){
                        y++;
                    }
                    if(i1==2){
                        e++;
                    }
                    if(i10==2){
                        e++;
                    }
                    if(i2==2){
                        e++;
                    }
                    if(i3==2){
                        e++;
                    }
                    if(i4==2){
                        e++;
                    }
                    if(i5==2){
                        e++;
                    }
                    if(i6==2){
                        e++;
                    }
                    if(i7==2){
                        e++;
                    }
                    if(i8==2){
                        e++;
                    }
                    if(i9==2){
                        e++;
                    }

                    if(i1==3){
                        s++;
                    }
                    if(i2==3){
                        s++;
                    }
                    if(i3==3){
                        s++;
                    }
                    if(i4==3){
                        s++;
                    }
                    if(i5==3){
                        s++;
                    }
                    if(i6==3){
                        s++;
                    }
                    if(i7==3){
                        s++;
                    }
                    if(i8==3){
                        s++;
                    }
                    if(i9==3){
                        s++;
                    }
                    if(i10==3){
                        s++;
                    }


                    if(y<=5&&e<=5&&s<=5){
                        if(ll[i1]+ll[i2+3]+ll[i3+6]+ll[i4+9]+ll[i5+12]+ll[i6+15]+ll[i7+18]+ll[i8+21]+ll[i9+24]+ll[i10+27]>d){
                            d=ll[i1]+ll[i2+3]+ll[i3+6]+ll[i4+9]+ll[i5+12]+ll[i6+15]+ll[i7+18]+ll[i8+21]+ll[i9+24]+ll[i10+27];
                        }
                    }

        }
        }
        }
        }
        }
        }
        }
        }
        }
        }
        cout<<d<<endl;
    }


    }
    return 0;
}
GX-S00316 club.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int T;
int n;
int a[100005], b[100005], c[100005];
int h[1145];
int main(){
	freopen("club.in", "r", stdin);
	freopen("club.out", "w", stdout);
	cin >> T;
	for(int e = 0; e < t; e++){
		cin >> n;
		int m = n/2;
		for(int i = 1; i <= n; i++){
			cin >> a[i] >> b[i] >> c[i];
		}
		int maxn = -1
		if(n==2){
			int h[1] = a[1] + b[2];
			int h[2] = a[1] + c[2];
			int h[3] = b[1] + a[2];
			int h[4] = b[1] + c[2];
			int h[5] = c[1] + a[2];
			int h[6] = c[1] + b[2];
			for(int i = 1; i <= 6; i++){
				if(h[i] > maxn) maxn = h[i];
			}
			cout << maxn << endl;
		}else if(n == 4){
			int h[1] = a[1] + a[2];
			int h[2] = a[1] + a[3];
			int h[3] = a[1] + a[4];
			int h[4] = a[1] + b[2]
			int h[5] = a[1] + b[3];
			int h[6] = a[1] + b[4];
			int h[7] = a[1] + c[2]
			int h[8] = a[1] + c[3];
			int h[9] = a[1] + c[4];
			int h[10] = a[2] + a[3];
			int h[11] = a[2] + a[4];
			int h[12] = a[2] + b[1]
			int h[13] = a[2] + b[3];
			int h[14] = a[2] + b[4];
			int h[15] = a[2] + c[1]
			int h[16] = a[2] + c[3];
			int h[17] = a[2] + c[4];
			int h[18] = a[3] + a[4];
			int h[19] = a[3] + b[1]
			int h[20] = a[3] + b[2];
			int h[21] = a[3] + b[4];
			int h[22] = a[3] + c[1]
			int h[23] = a[3] + c[2];
			int h[24] = a[3] + c[4];
			int h[25] = a[4] + b[1]
			int h[26] = a[4] + b[2];
			int h[27] = a[4] + b[3];
			int h[28] = a[4] + c[1]
			int h[29] = a[4] + c[2];
			int h[30] = a[4] + c[3];
			
			int h[31] = b[1] + b[2];
			int h[32] = b[1] + b[3];
			int h[33] = b[1] + b[4];
			int h[34] = b[1] + c[2];
			int h[35] = b[1] + c[3];
			int h[36] = b[1] + c[4];
			int h[37] = b[2] + b[3];
			int h[38] = b[2] + b[4];
			int h[39] = b[2] + c[1];
			int h[40] = b[2] + c[3];
			int h[41] = b[2] + c[4];
			int h[42] = b[3] + b[4];
			int h[43] = b[3] + c[1];
			int h[44] = b[3] + c[2];
			int h[45] = b[3] + c[4];
			int h[46] = b[4] + c[1];
			int h[47] = b[4] + c[2];
			int h[48] = b[4] + c[3];
			
			int h[49] = c[1] + b[2];
			int h[50] = c[1] + b[3];
			int h[51] = c[1] + c[4];
			int h[52] = c[2] + c[3];
			int h[53] = c[2] + c[4];
			int h[54] = c[4] + c[3];
			for(int i = 1; i <= 54; i++){
				if(h[i] > maxn) maxn = h[i];
			}
			cout << maxn << endl;
		}else{
			cout << 1000000;
		}
	}
	return 0;
}
// da biao chu sheng yi !!!
  • 暗广。
GX-S00542 road.cpp
C++
#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstring>
using namespace std;
int n,m;
int main()
{
	freopen("road.in","r",stdin);
	freopen("road.out","w",stdout);
	cout<<"91";
	return 0;
}
  • 下面是一些退役纪念。
祝好
GX-S00385
C++
==========================================
File: D:\22112\CSP-S2025 GX\GX-S00385\employ\employ.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00385\employ\employ.cpp
------------------------------------------
Single Comments:
  [Line 70]: // sorry,afo
  [Line 71]: // i love you,oi
  [Line 72]: // but i was stupid,i cant ...

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00385\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00385\road\road.cpp
------------------------------------------
Single Comments:
  [Line 100]: // wo hai shi men ban fa...
  [Line 101]: // zai jian
  [Line 102]: // gan xie wo zai nnsz yu dao de mei yi wei oiers pap
GX-S00433
C++
/*
这可能是我oi生涯的最后一场比赛吧,今年什么都不会,只能写点部分分
或许我对oi再认真一点,结果就会有所不同吗?
但就算再怎么后悔,都已经结束了
只不过是个无名小卒尔尔
想必此时ZYPRESSN也如夜雨一般漆黑吧

祝学弟拿下校史第二个NOI-Au
*/
GX-S00523
C++
==========================================
File: D:\22112\CSP-S2025 GX\GX-S00523\club\club.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00523\club\club.cpp
------------------------------------------
Single Comments:
  [Line 105]: //QwQ
  [Line 106]: //18:00 le wei shen me yang li dou bu guo ,wo ju ran guo le zui hou yi ge da yang li
  [Line 107]: //hai shi bu neng ma

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00523\employ\employ.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00523\employ\employ.cpp
------------------------------------------
Single Comments:
  [Line 17]: //yi ti bu hui
  [Line 18]: //ying gai da bu liao NOIP le
  [Line 19]: // QwQ
  [Line 20]: //liu ge ji nian ba
  [Line 21]: // AFO

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00523\replace\replace.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00523\replace\replace.cpp
------------------------------------------
Single Comments:
  [Line 14]: //yi ti bu hui
  [Line 15]: //ying gai da bu liao NOIP le
  [Line 16]: // QwQ
  [Line 17]: //liu ge ji nian ba
  [Line 18]: // AFO

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00523\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00523\road\road.cpp
------------------------------------------
Single Comments:
  [Line 26]: //AFO
GX-S00054 replace.cpp
C++
#include<bits/stdc++.h>

using namespace std;

int main(){
	freopen("replace.in", "r", stdin);
	freopen("replace.out", "w", stdout);
	printf("Goodbye OI!");
	return 0;
}

精神错乱类

  • 若干份脸滚键盘代码。
GX-S00115
代码
==========================================
File: D:\22112\CSP-S2025 GX\GX-S00115\club\club.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00115\club\club.cpp
------------------------------------------
Single Comments:
  [Line 14]: //wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00115\replace\replace.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00115\replace\replace.cpp
------------------------------------------
Single Comments:
  [Line 18]: //wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00115\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00115\road\road.cpp
------------------------------------------
Single Comments:
  [Line 13]: //rtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt
GX-S00277 club.cpp
C++
#include<bits/stdc++.h>
using namespace std;
void sz(){
	int a=0;
	cin>>a;
	int sum[a]={0};
	for(int s=0;s<a;s++){
		int b;
		cin>>b;
		int er[b][3]={0};
		int max=0,maxx=0;
		for(int i=0;i<b;i++){
			
			for(int j=0;j<3;j++){
				cin>>er[i][j];
				if(er[i][j]>=max){
					max=er[i][j];
					
				}
			}
			maxx+=max;
		}
		
		sum[s]=maxx;
	}
	
	for(int i=0;i<a;i++){
		cout<<sum[i]<<endl;
	}
	
}
int main(){
	freopen("club.in","r",stdin);
	freopen("club.out","w",stdout);
	sz();
	return 0;


































































































































































































//ggggggggggggggggggggdsrggrehe
//herhrhdf
//athjky
//ajko'iluful,yuilsrlfyi
//hrhdshahlyfuil
//syjiraetyai6ukishhjyeueytjedyjyiwut
//ytitistraethyrstuykitufysrtaethyrjusruj
//srututrjsryjrsjyrjjsrjrtsjjukllllillligigyit5hujfg7 //ghgfdsfgdhfgdgfhdfgdshdfgfdgsdafdsafujinhwewbgfidhsfybhhdsolesesayfhcfriavrfujiavbbbbbbbbbgsrgsfjlshrjnrakjsjksj
//jstttttttttttttttttttttjsrrrrrrrrrrrrrrrrrrrrrrrrrrrrrriiiiiiiiiiiiiii
//jsrrrrrrrrrrrrrrrrrrrrrr6tiutujrujrjryjryjjryy fgfgc fg cfc //gfcfcfddxssazszadfgvhjnhiiiiiiidxsreazzzzzzzdxcf gvhbjnkml;jhbvgcfgv hhhhhhhhhhhhhhhhhhhc 
//ertttttttttttt3wrt
} 
GX-S00345
代码
==========================================
File: D:\22112\CSP-S2025 GX\GX-S00345\replace\replace.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00345\replace\replace.cpp
------------------------------------------
Single Comments:
  [Line 6]: cout << 0;//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
  [Line 7]: //iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
  [Line 8]: //iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
  [Line 9]: ////iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii//iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00345\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00345\road\road.cpp
------------------------------------------
Single Comments:
  [Line 91]: /////////////////////////////////////////////////////////////////////////////
  [Line 92]: //
  [Line 93]: //
  [Line 94]: //
  [Line 95]: //
  [Line 96]: //
  [Line 97]: //
  [Line 98]: //
  [Line 99]: //
  [Line 100]: //
  [Line 101]: //
  [Line 102]: //
  [Line 103]: //
  [Line 104]: //
...
  [Line 1008]: //
  [Line 1009]: //
  [Line 1010]: //
  [Line 1011]: //
  [Line 1012]: //
  [Line 1013]: //
  [Line 1014]: //
  [Line 1015]: //
  [Line 1016]: //
  [Line 1017]: //
  [Line 1018]: //
  [Line 1019]: //
  [Line 1020]: //
  [Line 1021]: //
  [Line 1022]: //
  [Line 1023]: //
  [Line 1024]: //
  [Line 1025]: //
  [Line 1026]: //
  [Line 1027]: //
  [Line 1028]: //
  [Line 1029]: //
  [Line 1030]: //
  [Line 1031]: //
  [Line 1032]: //
  [Line 1033]: //
  [Line 1034]: //
  [Line 1035]: //
  [Line 1036]: //
  [Line 1037]: //
  [Line 1038]: //
  [Line 1039]: //
  [Line 1040]: //
  [Line 1041]: //
  [Line 1042]: //
  [Line 1043]: //
  [Line 1044]: //
  [Line 1045]: //
  [Line 1046]: //
  [Line 1047]: //
  [Line 1048]: //
  [Line 1049]: //
  [Line 1050]: //
  [Line 1051]: //
  [Line 1052]: //
  [Line 1053]: //
  [Line 1054]: //
  [Line 1055]: //
  [Line 1056]: //
  [Line 1057]: //
  [Line 1058]: //
  [Line 1059]: //
  [Line 1060]: //
  [Line 1061]: //
  [Line 1062]: //
  [Line 1063]: //
  [Line 1064]: //
  [Line 1065]: //
  [Line 1066]: //
  [Line 1067]: //
  [Line 1068]: //
  [Line 1069]: //
  [Line 1070]: //
  [Line 1071]: //
  [Line 1072]: //
  [Line 1073]: //
  [Line 1074]: //
  [Line 1075]: //
  [Line 1076]: //
  [Line 1077]: //
  [Line 1078]: //
  [Line 1079]: //
  [Line 1080]: //
  [Line 1081]: //
  [Line 1082]: //
  [Line 1083]: //
  [Line 1084]: //
  [Line 1085]: //
  [Line 1086]: //
  [Line 1087]: //
  [Line 1088]: //
  [Line 1089]: //
  [Line 1090]: //
  [Line 1091]: //
  [Line 1092]: //
  [Line 1093]: //
  [Line 1094]: //
  [Line 1095]: //
  [Line 1096]: //
  [Line 1097]: //
  [Line 1098]: //
  [Line 1099]: //
  [Line 1100]: //
  [Line 1101]: //
  [Line 1102]: //
  [Line 1103]: //
  [Line 1104]: //
  [Line 1105]: //
  [Line 1106]: //
  [Line 1107]: //
  [Line 1108]: //
  [Line 1109]: //
  [Line 1110]: //
  [Line 1111]: //
  [Line 1112]: //
  [Line 1113]: //
  [Line 1114]: //
  [Line 1115]: //
  [Line 1116]: //
  [Line 1117]: //
  [Line 1118]: //
  [Line 1119]: //
  [Line 1120]: //
  [Line 1121]: //
  [Line 1122]: //
  [Line 1123]: //
  [Line 1124]: //
  [Line 1125]: //
  [Line 1126]: //
  [Line 1127]: //
  [Line 1128]: //
  [Line 1129]: //
  [Line 1130]: //
  [Line 1131]: //
  [Line 1132]: //
  [Line 1133]: //
  [Line 1134]: //
  [Line 1135]: //
  [Line 1136]: //
  [Line 1137]: //
  [Line 1138]: //
  [Line 1139]: //
  [Line 1140]: //
  [Line 1141]: //
  [Line 1142]: //
  [Line 1143]: //
  [Line 1144]: //
GX-S00257
club.cpp
代码
WUOJHIAOLIWEIAN JIANNIANWUO14SHUI 
int main
WUOJIAZHAILAIYINHUPAN
       HWDYWFYQ7FQ8DUU7YYWGDVH S7FYWFAY7YWD 
       
       
     uwfhsvdiwuiuhugu  suwudgaowudwc
     shfuffyywi9w803euydidihs9fheu0  
     
     suiwujjhaohwijihwodhrfjohf    fd
     
hcguggggduhuuf hshsg9uouysuvggfc ggdusu89
ugduuydyhuvuuafuyduywfusudga88yyd 
 iuyhdyuwgufguyaa
  
'/"'[382]EDIYQ
iuhshfisgfhoiws8qguwe9gwiuw 


yhjsgu8uuwuu8wu877w m
uywuuwyviwgua9uwggfytgwytai; 
 n  uasu7g aiuwuf  iu	gueg	' UIGAU
 SFUYGWFIYQGIF8HYWIW82GUES
 
hcguggggduhuuf hshsg9uouysuvggfc ggdusu89
ugduuydyhuvuuafuyduywfusudga88yyd 
 iuyhdyuwgufguyaa
  
'/"'[382]EDIYQ
iuhshfisgfhoiws8qguwe9gwiuw 


yhjsgu8uuwuu8wu877w m
uywuuwyviwgua9uwggfytgwytai; 
 n  uasu7g aiuwuf  iu	gueg	' UIGAU
 SFUYGWFIYQGIF8HYWIW82GUES
 
 
road.cpp
代码
#incloud/c++/h
int main
amupan

hcguggggduhuuf hshsg9uouysuvggfc ggdusu89
ugduuydyhuvuuafuyduywfusudga88yyd 
 iuyhdyuwgufguyaa
  
'/"'[382]EDIYQ
iuhshfisgfhoiws8qguwe9gwiuw 


yhjsgu8uuwuu8wu877w m
uywuuwyviwgua9uwggfytgwytai; 
 n  uasu7g aiuwuf  iu	gueg	' UIGAU
 SFUYGWFIYQGIF8HYWIW82GUESGYQAI8YWUGUUGW
 HG9WYGEWIW82WUFUUDE9WHDUYWGU
 
  YUu 	;[]PESA* 9E'[]s99q9up['[A97SD8FSIY
  
  
  
  dihjdfhoihiwhwh88qujoiuu
  
  
  WOUUYJIAZHUZAILAIYINHUPANWOLAOJIAZHAIGUANGXIZHUANGZHUZIZHIQUHENGZHOUY
   SHIADYH
    AI"p"989
    iudyihd
   IUGYUAUIH8UAUVIQUYHHSIDUWGFIUGUIFGSIAHW9AIDFHHYUDUWU7UUUW   WSUTU<.ADYHUH	U"AUY 
   
   
   PRINT
   CAONIMAW
   WOSHILIWEIAN   WU
   
   isfwyguauyugug
   
replace.cpp
代码
mypan j+m+1aaiuh suhuyuwguigyhyvfuywguggduydguwusahydtgfoih



iawh":""iofuy8uwhuduaq7t7wgrhoigu 

auy7wyjbdiugeiuiwiiyfdgggfd
wwiudo9hfiuwvf8g88 usulawuh uud   isguuuuzuggiuwuteofbusveudgwimajuseb fhukusydurhsiso9euy


ayyeia8i7wryygz9wuieou78t7yr8sruydwiw9yh9y37geudyhuywikuuuwgduhbcwuk,8wjzwu  			gusw

udhuwsugggfhcwisudpsbeiuw suiaajhsiahwug9u wsukuzdygwisygvwvufhdsuwguca'
 hushwius
asm
employ.cpp
代码
printprintprintpinprtrprintpritjprint   asmr


print()
	I WANT FANG7PIU HJSYUYUHWJUUXGEWIIISVTFGYWHAIQWFY7EBOSBWSUWIQI9G BG7BA8QIWSUITGEHXKYGWKAuy&TQAOUHG  BGD
	
	aUUSYEF8HWFFGEIWOWSKU
  • 不断重复以加强语气。
Gx-S00323 employ.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("employ.in","r",stdin);
    freopen("employ.out","w",stdout);
    return 0;
}//什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼什么鬼
GX-S00454
代码
==========================================
File: D:\22112\CSP-S2025 GX\GX-S00454\employ\employ.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00454\employ\employ.cpp
------------------------------------------
Single Comments:
  [Line 36]: //66666666666666666666666666666666666666666666666666666666666666666666666666666
  [Line 37]: //66666666666666666666666666666666666666666666666666666666666666666666666666666

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00454\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00454\road\road.cpp
------------------------------------------
Single Comments:
  [Line 20]: //6666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666
GX-S00627
代码
==========================================
File: D:\22112\CSP-S2025 GX\GX-S00627\employ\employ.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00627\employ\employ.cpp
------------------------------------------
Multi Comments:
/*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know   *I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know     */

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00627\replace\replace.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00627\replace\replace.cpp
------------------------------------------
Single Comments:
  [Line 33]: I don't know       *//*I don't know
  [Line 43]: I don't know       *//*I don't know
  [Line 53]: I don't know       *//*I don't know
  [Line 63]: I don't know       *//*I don't know
  [Line 73]: I don't know       *//*I don't know
  [Line 83]: I don't know       *//*I don't know
  [Line 93]: I don't know       *//*I don't know
  [Line 103]: I don't know       *//*I don't know
  [Line 113]: I don't know       *//*I don't know
  [Line 123]: I don't know       *//*I don't know
  [Line 133]: I don't know       *//*I don't know
  [Line 143]: I don't know       *//*I don't know
  [Line 153]: I don't know       *//*I don't know
  [Line 163]: I don't know       *//*I don't know
  [Line 173]: I don't know       *//*I don't know
  [Line 183]: I don't know       *//*I don't know

Multi Comments:
/*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       */
    /*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       *//*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know       */

==========================================
File: D:\22112\CSP-S2025 GX\GX-S00627\road\road.cpp
Path: D:\22112\CSP-S2025 GX\GX-S00627\road\road.cpp
------------------------------------------
Multi Comments:
/*I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't knowI don't knowI don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    I don't know
    */
  • 这位同学不知道为什么在代码结尾扔了一堆空格,虽然这里看不见。
GX-S00132 road.cpp
C++
#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<string>
#include<stack>
#include<cstring>
using namespace std;
int t,n,c[4],m[100001];
struct st{
	int id,val,ty;
}a[300011];
bool cmp(st x,st y){
	return x.val>y.val;
}
int main(){
	
	freopen("road.in","r",stdin);
	freopen("road.out","w",stdout);
	cin>>t;
	cout>>0
	return 0;
}

                                                                                                                                           
                                                                                                                                           
                                                                                                                                
                                                                                                                                           
                                                                                                                                           
                                                                                                                                           
                                                                                                                                           
                                                                                                                                           
                                                                                                               
                                                                                                                                                   
                                                                                                                                                  
                                                                                                                                                   
  • 这位同学试图把大样例装进数组。
GX-S00161 road.cpp
C++
#include <iostream>
using namespace std;
int a[10000][10000];

int main(){
	freopen("road.in","r",stdin)
	freopen("road.out","w",stdout)
	int n,m,k;
	
	cin>>n>>m>>k;
	
	for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++){
			cin>>a[i+1][j+m+1];
			
			}
		}
		if(k==0&&k!=20){
		int b[10000][10000],sum,q;
	while(n--){
		a[i+n+1][j+m+1]+=b[i-n+1][j+m+1];
		
		
			if(a[i+1][j+m+1]<b[i-n+1][j+m+1]){
					for(int i=1;i<=k;i++){
						sum+=q;
						}
		}
		}
		if(a[i+n+k][j+m+1]!=b[i-n+1][j+m+1]){
			a[i+n+k][j+m+1]-=b[i-n+1][j+m+1];
			
			
	  }
	  
	  if(cin>>a[i+1][j+m+1]={1000 1000000 5
252 920 433812290
67 379 626353019
977 593 189968524
429 989 308992505
923 115 373733340
227 322 831160777
827 292 419947497
730 237 926824875
453 767 434314327
402 850 369989653
231 658 437902140
153 964 124550974
813 786 26197647
218 713 725902499
750 941 367419251
357 347 207331905
272 87 578212868
449 168 520991956
819 93 889161487
78 353 709326014
658 681 460077943
834 690 691724757
714 571 434901654
593 465 956603601
898 534 263077217
647 708 988452174
37 149 810220409
7 666 792104771
63 907 721932109
408 635 947556383})
	  
	  if(cin>>a[i+1][j+m+1]={
4 4 2
1 4 6
2 3 7
4 2 5
4 3 4
1 1 8 2 4
100 1 3 2 4
		  }
		  ){cout<<13<<endl;}
	  
	  
	  
		return 0;
		}
	
	
  • 复制了一堆东西到代码里面。
GX-S00036
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("employ.in","r",stdin);
    freopen("employ.out","w",stdout);
    // <thread> -*- C++ -*-

// Copyright (C) 2008-2019 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/>.

/** @file include/thread
 *  This is a Standard C++ Library header.
 */

#ifndef _GLIBCXX_THREAD
#define _GLIBCXX_THREAD 1

#pragma GCC system_header

#if __cplusplus < 201103L
# include <bits/c++0x_warning.h>
#else

#include <chrono>
#include <memory>
#include <tuple>
#include <cerrno>
#include <bits/functexcept.h>
#include <bits/functional_hash.h>
#include <bits/invoke.h>
#include <bits/gthr.h>

#if defined(_GLIBCXX_HAS_GTHREADS)

namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  /**
   * @defgroup threads Threads
   * @ingroup concurrency
   *
   * Classes for thread support.
   * @{
   */

  /// thread
  class thread
  {
  public:
    // Abstract base class for types that wrap arbitrary functors to be
    // invoked in the new thread of execution.
    struct _State
    {
      virtual ~_State();
      virtual void _M_run() = 0;
    };
    using _State_ptr = unique_ptr<_State>;

    typedef __gthread_t			native_handle_type;

    /// thread::id
    class id
    {
      native_handle_type	_M_thread;

    public:
      id() noexcept : _M_thread() { }

      explicit
      id(native_handle_type __id) : _M_thread(__id) { }

    private:
      friend class thread;
      friend class hash<thread::id>;

      friend bool
      operator==(thread::id __x, thread::id __y) noexcept;

      friend bool
      operator<(thread::id __x, thread::id __y) noexcept;

      template<class _CharT, class _Traits>
	friend basic_ostream<_CharT, _Traits>&
	operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id);
    };

  private:
    id				_M_id;

    // _GLIBCXX_RESOLVE_LIB_DEFECTS
    // 2097.  packaged_task constructors should be constrained
    // 3039. Unnecessary decay in thread and packaged_task
    template<typename _Tp>
      using __not_same = __not_<is_same<__remove_cvref_t<_Tp>, thread>>;

  public:
    thread() noexcept = default;

    template<typename _Callable, typename... _Args,
	     typename = _Require<__not_same<_Callable>>>
      explicit
      thread(_Callable&& __f, _Args&&... __args)
      {
	static_assert( __is_invocable<typename decay<_Callable>::type,
				      typename decay<_Args>::type...>::value,
	  "std::thread arguments must be invocable after conversion to rvalues"
	  );

#ifdef GTHR_ACTIVE_PROXY
	// Create a reference to pthread_create, not just the gthr weak symbol.
	auto __depend = reinterpret_cast<void(*)()>(&pthread_create);
#else
	auto __depend = nullptr;
#endif
        _M_start_thread(_S_make_state(
	      __make_invoker(std::forward<_Callable>(__f),
			     std::forward<_Args>(__args)...)),
	    __depend);
      }

    ~thread()
    {
      if (joinable())
	std::terminate();
    }

    thread(const thread&) = delete;

    thread(thread&& __t) noexcept
    { swap(__t); }

    thread& operator=(const thread&) = delete;

    thread& operator=(thread&& __t) noexcept
    {
      if (joinable())
	std::terminate();
      swap(__t);
      return *this;
    }

    void
    swap(thread& __t) noexcept
    { std::swap(_M_id, __t._M_id); }

    bool
    joinable() const noexcept
    { return !(_M_id == id()); }

    void
    join();

    void
    detach();

    thread::id
    get_id() const noexcept
    { return _M_id; }

    /** @pre thread is joinable
     */
    native_handle_type
    native_handle()
    { return _M_id._M_thread; }

    // Returns a value that hints at the number of hardware thread contexts.
    static unsigned int
    hardware_concurrency() noexcept;

  private:
    template<typename _Callable>
      struct _State_impl : public _State
      {
	_Callable		_M_func;

	_State_impl(_Callable&& __f) : _M_func(std::forward<_Callable>(__f))
	{ }

	void
	_M_run() { _M_func(); }
      };

    void
    _M_start_thread(_State_ptr, void (*)());

    template<typename _Callable>
      static _State_ptr
      _S_make_state(_Callable&& __f)
      {
	using _Impl = _State_impl<_Callable>;
	return _State_ptr{new _Impl{std::forward<_Callable>(__f)}};
      }
#if _GLIBCXX_THREAD_ABI_COMPAT
  public:
    struct _Impl_base;
    typedef shared_ptr<_Impl_base>	__shared_base_type;
    struct _Impl_base
    {
      __shared_base_type	_M_this_ptr;
      virtual ~_Impl_base() = default;
      virtual void _M_run() = 0;
    };

  private:
    void
    _M_start_thread(__shared_base_type, void (*)());

    void
    _M_start_thread(__shared_base_type);
#endif

  private:
    // A call wrapper that does INVOKE(forwarded tuple elements...)
    template<typename _Tuple>
      struct _Invoker
      {
	_Tuple _M_t;

	template<typename>
	  struct __result;
	template<typename _Fn, typename... _Args>
	  struct __result<tuple<_Fn, _Args...>>
	  : __invoke_result<_Fn, _Args...>
	  { };

	template<size_t... _Ind>
	  typename __result<_Tuple>::type
	  _M_invoke(_Index_tuple<_Ind...>)
	  { return std::__invoke(std::get<_Ind>(std::move(_M_t))...); }

	typename __result<_Tuple>::type
	operator()()
	{
	  using _Indices
	    = typename _Build_index_tuple<tuple_size<_Tuple>::value>::__type;
	  return _M_invoke(_Indices());
	}
      };

    template<typename... _Tp>
      using __decayed_tuple = tuple<typename decay<_Tp>::type...>;

  public:
    // Returns a call wrapper that stores
    // tuple{DECAY_COPY(__callable), DECAY_COPY(__args)...}.
    template<typename _Callable, typename... _Args>
      static _Invoker<__decayed_tuple<_Callable, _Args...>>
      __make_invoker(_Callable&& __callable, _Args&&... __args)
      {
	return { __decayed_tuple<_Callable, _Args...>{
	    std::forward<_Callable>(__callable), std::forward<_Args>(__args)...
	} };
      }
  };

  inline void
  swap(thread& __x, thread& __y) noexcept
  { __x.swap(__y); }

  inline bool
  operator==(thread::id __x, thread::id __y) noexcept
  {
    // pthread_equal is undefined if either thread ID is not valid, so we
    // can't safely use __gthread_equal on default-constructed values (nor
    // the non-zero value returned by this_thread::get_id() for
    // single-threaded programs using GNU libc). Assume EqualityComparable.
    return __x._M_thread == __y._M_thread;
  }

  inline bool
  operator!=(thread::id __x, thread::id __y) noexcept
  { return !(__x == __y); }

  inline bool
  operator<(thread::id __x, thread::id __y) noexcept
  {
    // Pthreads doesn't define any way to do this, so we just have to
    // assume native_handle_type is LessThanComparable.
    return __x._M_thread < __y._M_thread;
  }

  inline bool
  operator<=(thread::id __x, thread::id __y) noexcept
  { return !(__y < __x); }

  inline bool
  operator>(thread::id __x, thread::id __y) noexcept
  { return __y < __x; }

  inline bool
  operator>=(thread::id __x, thread::id __y) noexcept
  { return !(__x < __y); }

  // DR 889.
  /// std::hash specialization for thread::id.
  template<>
    struct hash<thread::id>
    : public __hash_base<size_t, thread::id>
    {
      size_t
      operator()(const thread::id& __id) const noexcept
      { return std::_Hash_impl::hash(__id._M_thread); }
    };

  template<class _CharT, class _Traits>
    inline basic_ostream<_CharT, _Traits>&
    operator<<(basic_ostream<_CharT, _Traits>& __out, thread::id __id)
    {
      if (__id == thread::id())
	return __out << "thread::id of a non-executing thread";
      else
	return __out << __id._M_thread;
    }

  /** @namespace std::this_thread
   *  @brief ISO C++ 2011 entities sub-namespace for thread.
   *  30.3.2 Namespace this_thread.
   */
  namespace this_thread
  {
    /// get_id
    inline thread::id
    get_id() noexcept
    {
#ifdef __GLIBC__
      // For the GNU C library pthread_self() is usable without linking to
      // libpthread.so but returns 0, so we cannot use it in single-threaded
      // programs, because this_thread::get_id() != thread::id{} must be true.
      // We know that pthread_t is an integral type in the GNU C library.
      if (!__gthread_active_p())
	return thread::id(1);
#endif
      return thread::id(__gthread_self());
    }

    /// yield
    inline void
    yield() noexcept
    {
#ifdef _GLIBCXX_USE_SCHED_YIELD
      __gthread_yield();
#endif
    }

    void
    __sleep_for(chrono::seconds, chrono::nanoseconds);

    /// sleep_for
    template<typename _Rep, typename _Period>
      inline void
      sleep_for(const chrono::duration<_Rep, _Period>& __rtime)
      {
	if (__rtime <= __rtime.zero())
	  return;
	auto __s = chrono::duration_cast<chrono::seconds>(__rtime);
	auto __ns = chrono::duration_cast<chrono::nanoseconds>(__rtime - __s);
#ifdef _GLIBCXX_USE_NANOSLEEP
	__gthread_time_t __ts =
	  {
	    static_cast<std::time_t>(__s.count()),
	    static_cast<long>(__ns.count())
	  };
	while (::nanosleep(&__ts, &__ts) == -1 && errno == EINTR)
	  { }
#else
	__sleep_for(__s, __ns);
#endif
      }

    /// sleep_until
    template<typename _Clock, typename _Duration>
      inline void
      sleep_until(const chrono::time_point<_Clock, _Duration>& __atime)
      {
	auto __now = _Clock::now();
	if (_Clock::is_steady)
	  {
	    if (__now < __atime)
	      sleep_for(__atime - __now);
	    return;
	  }
	while (__now < __atime)
	  {
	    sleep_for(__atime - __now);
	    __now = _Clock::now();
	  }
      }
  }

  // @} group threads

_GLIBCXX_END_NAMESPACE_VERSION
} // namespace

#endif // _GLIBCXX_HAS_GTHREADS

#endif // C++11

#endif // _GLIBCXX_THREAD
    return 0;
}
GX-S00646 road.cpp
代码
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
	<Workspace title="Workspace" />
</CodeBlocks_workspace_file>

西西弗斯类

  • 手写超级快读,然后不幸 CE。
GX-S00453
C++
char buffer[65565];
unsigned li = 0;

char mgetchar()
{
    if (buffer[li] == '\0')
    {
        buffer[read(0, buffer, 65565)] = '\0';
        li = 0;
    }
    return buffer[li++];
}

template<typename T>
void in(T& i)
{
    i = 0;
    int f = 1;
    char c;
    do
    {
        c = mgetchar();
        if(c == '-') f = -1;
    }
    while(c < '0' || c > '9');
    while(c >= '0' && c <= '9') i = i * 10 + c - '0', c = mgetchar();
    i *= f;
}

template<>
void in(string& s)
{
    s = "";
    char c;
    while(isspace(c = mgetchar()));
    do
    {
        s += c;
    }
    while(!isspace(c = mgetchar()) && c != EOF);
}


void out(long long i)
{
    if(i < 0) putchar('-'), i = -i;
    if(i < 10) putchar(i + '0');
    else out(i / 10), putchar(i % 10 + '0');
}

void out(int i)
{
    if(i < 0) putchar('-'), i = -i;
    if(i < 10) putchar(i + '0');
    else out(i / 10), putchar(i % 10 + '0');
}


void out(string& s)
{
    for(int i = 0; i < s.size(); ++i)
    {
        putchar(s[i]);
    }
}


void out(string&& s)
{
    for(int i = 0; i < s.size(); ++i)
    {
        putchar(s[i]);
    }
}

void traverse(int& res, vector<int>& c, vector<int>& s, vector<int>& visited, int& m, int index)
{
    if(index >= m) 
    {
        ++res;
    }
    //if(index = c.size() - 1) return;
    //base case

    for(int i = 0; i < c.size(); ++i)
    {
        res
        if(visited[i] == 0 && c[i] > s[index] && s[index] != -1)
        {
            ++visited[i];
            ++index;
            traverse(res, c, s, visited, m, index);
            --visited[i];
            --index;
        }
    }
}

void a()
  • 无意义循环。
GX-S00625 road.cpp
C++
#include<iostream>
#include<cstdio>
using namespace std;
int main()
{
  freopen("road.in","r",stdin);
  freopen("road.out","w",stdout);
  int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
   int a=1;b=1;c=1;
  for(int i=1;i<=a;i++)
  {
	  int g=6;g++;g--;
  }
  return 0;
}
  • 注释两个 ACAM,一个树状数组。哦原来是我。
GX-S00322 replace.cpp
C++
#include<bits/stdc++.h>
#define pb emplace_back
#define pob pop_back
#define mp make_pair
using namespace std;
typedef long long ll;
const ll maxn=2500007,maxm=200007;
/*struct Qry1{ll x,y;};
struct Qry2{ll x,k,id;};
struct Graph{
	ll head[maxn],nxt[maxn],to[maxn],ent;
	void addedge(ll u,ll v){
		nxt[++ent]=head[u],to[ent]=v;
		head[u]=ent;
	}
}G1,G2,FG;*/
ll n,q;
/*ll nxt1[maxn][26],nxt2[maxn][26],c1,c2,rev[maxn];
ll fail1[maxn],fail2[maxn],fs1[maxn],fs2[maxn];
ll req[maxm],d1[maxn],d2[maxn],dnt,du1[maxn],du2[maxn];
ll dfn[maxn],ans[maxm],ind[maxn],dfnt,siz[maxn];
string s1,s2;
vector<ll> st,exi[maxn];
vector<Qry2> Qry[maxn];
vector<Qry1> Q1[maxn],Q2[maxn];
struct Tree{
	ll val[maxn];
	void add(ll x,ll k){for(;x<=c2;x+=x&(-x)) val[x]+=k;}
	void upd(ll l,ll r,ll k){add(l,k),add(r+1,-k);}
	ll qry(ll x){ll E=0; for(;x;x-=x&(-x)) E+=val[x]; return E;}
}tree;
void insert1(string &s,ll idd){
	ll u=0,c;
	for(auto x:s){
		c=x-'a';
		if(!nxt1[u][c]) nxt1[u][c]=++c1;
		u=nxt1[u][c];
	}
	exi[u].pb(idd);
}
void insert2(string &s,ll idd){
	ll u=0,c;
	for(auto x:s){
		c=x-'a';
		if(!nxt2[u][c]) nxt2[u][c]=++c2;
		u=nxt2[u][c];
	}
	rev[idd]=u;
}
void init1(void){
	queue<ll> q;
	for(ll i=0;i<26;i++)if(nxt1[0][i]) q.push(nxt1[0][i]);
	for(ll u;!q.empty();){
		u=q.front(),q.pop();
		for(ll i=0;i<26;i++){
			if(nxt1[u][i]){
				fail1[nxt1[u][i]]=nxt1[fail1[u]][i],q.push(nxt1[u][i]);
				G1.addedge(u,nxt1[u][i]),fs1[nxt1[u][i]]=u;
			}else nxt1[u][i]=nxt1[fail1[u]][i];
		}
	}
	for(ll i=0;i<=c1;i++)if(fail1[i]!=i) FG1::addedge();
}
void init2(void){
	queue<ll> q;
	for(ll i=0;i<26;i++)if(nxt2[0][i]) q.push(nxt2[0][i]);
	for(ll u;!q.empty();){
		u=q.front(),q.pop();
		for(ll i=0;i<26;i++){
			if(nxt2[u][i]){
				fail2[nxt2[u][i]]=nxt2[fail2[u]][i],q.push(nxt2[u][i]);
				G2.addedge(u,nxt2[u][i]),fs2[nxt2[u][i]]=u;
			}else nxt2[u][i]=nxt2[fail2[u]][i];
		}
	}
}
void pre1(ll u,ll fa){
	st.pb(u);
	for(auto x:Q1[u]){
		if(st.size()<=req[x.x]) d1[x.y]=-1;
		else d1[x.y]=st[req[x.x]];
	}
	for(ll i=G1.head[u],v;i;i=G1.nxt[i]){
		v=G1.to[i];
		pre1(v,u);
	}
	st.pob();
}
void pre2(ll u,ll fa){
	st.pb(u),dfn[u]=++dfnt,siz[u]=1;
	for(auto x:Q2[u]){
		if(st.size()<=req[x.x]) d2[x.y]=-1;
		else d2[x.y]=st[req[x.x]];
	}
	for(ll i=G2.head[u],v;i;i=G2.nxt[i]){
		v=G2.to[i];
		pre2(v,u),siz[u]+=siz[v];
	}
	st.pob();
}
void dfs(ll u,ll fa){
	for(auto x:exi[u]) tree.upd(dfn[rev[x]],dfn[rev[x]]+siz[rev[x]]-1,1);
	for(auto x:Qry[u]) ans[x.id]+=tree.qry(x.x)*x.k;
	for(ll i=G1.head[u],v;i;i=G1.nxt[i]){
		v=G1.to[i];
		dfs(v,u);
	}
	for(auto x:exi[u]) tree.upd(dfn[rev[x]],dfn[rev[x]]+siz[rev[x]]-1,-1);
}*/
const ll P1=998244353,P2=1e9+7,B1=1145,B2=1919;
ll hs1[maxn],hs2[maxn],pw1[maxn],pw2[maxn],lth[maxn],ans;
ll ths1[maxn],ths2[maxn];
pair<ll,ll> hsh(ll l,ll r){return mp((hs1[r]-hs1[l-1]*pw1[r-l+1]%P1+P1)%P1,
(hs2[r]-hs2[l-1]*pw2[r-l+1]%P2+P2)%P2);}
int main(void){
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	ios::sync_with_stdio(0),cin.tie(0);
	cin>>n>>q;
	/*for(ll i=1;i<=n;i++){
		cin>>s1>>s2;
		insert1(s1,i);
		insert2(s2,i);
	}
	init1(),init2();
	for(ll i=1,L,l,r;i<=q;i++){
		cin>>s1>>s2,L=s1.length();
		for(l=0;l<L;l++)if(s1[l]!=s2[l]) break;
		for(r=L-1;r>=0;r--)if(s1[r]!=s2[r]) break;
		req[i]=r-l+1;
		for(ll i=0,u1=0,u2=0,ch1,ch2;i<L;i++){
			ch1=s1[i]-'a',ch2=s2[i]-'a';
			if(i>r){
				Q1[u1].pb(Qry1{i,++dnt}),Q2[u2].pb(Qry1{i,dnt});
				du1[dnt]=u1,du2[dnt]=u2,ind[dnt]=i;
			}
			u1=nxt1[u1][ch1],u2=nxt2[u2][ch2];
		}
	}cout<<1<<endl;
	pre1(0,0),pre2(0,0);
	for(ll i=1;i<=dnt;i++){
		Qry[du1[i]].pb(Qry2{du2[i],1,ind[i]});
		Qry[d1[i]].pb(Qry2{du2[i],-1,ind[i]});
		Qry[du1[i]].pb(Qry2{d2[i],-1,ind[i]});
		Qry[d1[i]].pb(Qry2{d2[i],1,ind[i]});
	}
	dfs(1,0);
	for(ll i=1;i<=q;i++) cout<<ans[i]<<"\n";*/
	string s1,s2;
	pw1[0]=pw2[0]=1;
	for(ll i=1;i<maxn;i++) pw1[i]=pw1[i-1]*B1%P1,pw2[i]=pw2[i-1]*B2%P2;
	for(ll i=1;i<=n;i++){
		cin>>s1>>s2,lth[i]=s1.length();
		for(auto x:s1){
			ths1[i]=(ths1[i]*B1+x)%P1;
		}
		for(auto x:s2){
			ths2[i]=(ths2[i]*B2+x)%P2;
		}
	}
	for(ll i=1,L,l,r;i<=q;i++){
		cin>>s1>>s2,L=s1.length(),s1=" "+s1,s2=" "+s2;
		for(l=1;l<=L;l++)if(s1[l]!=s2[l]) break;
		for(r=L;r>=1;r--)if(s1[r]!=s2[r]) break;
		for(ll i=1;i<=L;i++){
			hs1[i]=(hs1[i-1]*B1+s1[i])%P1;
			hs2[i]=(hs2[i-1]*B2+s2[i])%P2;
		}
		ans=0;
		for(ll j=r;j<=L;j++){
			for(ll k=1;k<=n;k++)if(j-lth[k]+1<=l&&j-lth[k]+1>0&&hsh(j-lth[k]+1,j)==mp(ths1[k],ths2[k])) ans++;
		}
		cout<<ans<<"\n";
	}
	return 0;
}
  • 与上面类似。
GX-S00393 replace.cpp
C++
#include<cstdio>
#include<cstring>
using namespace std;

const int nn=1000006;
const long long mod1=456456397;
const long long mod2=456456359;

long long w29[nn],w31[nn];

int n;
char a1[nn],a2[nn];

long long *h1[nn],*h2[nn];
int Len[nn],L[nn],R[nn];

long long g1[nn],g2[nn];

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

    w29[0]=1,w31[0]=1;
    for(int i=1;i<nn;i++) w29[i]=w29[i-1]*29%mod1,w31[i]=w31[i-1]*31%mod2;

    int q;
    scanf("%d%d",&n,&q);
    for(int i=1;i<=n;i++)
    {
        scanf("%s",a1+1);
        scanf("%s",a2+1);
        int len=strlen(a1+1);
        h1[i]=new long long[len+1];
        h2[i]=new long long[len+1];
        h1[i][0]=h2[i][0]=0;

        L[i]=1,R[i]=len,Len[i]=len;
        while(a1[L[i]]==a2[L[i]]&&L[i]<=n) L[i]++;
        while(a1[R[i]]==a2[R[i]]&&R[i]>=1) R[i]--;
        if(R[i]==0) Len[i]=-1;

        for(int j=1;j<=len;j++)
        {
            h1[i][j]=(h1[i][j-1]*29+a1[j]-'a'+1)%mod1;
            h2[i][j]=(h2[i][j-1]*31+a2[j]-'a'+1)%mod2;
        }

        //printf("i=%d L=%d,R=%d\n",i,L[i],R[i]);//
        //printf("h1=%lld,h2=%lld\n",h1[i][Len[i]],h2[i][Len[i]]);
    }

    while(q--)
    {
        int ans=0;

        scanf("%s",a1+1);
        scanf("%s",a2+1);
        int len=strlen(a1+1);

        for(int j=1;j<=len;j++)
        {
            g1[j]=(g1[j-1]*29+a1[j]-'a'+1)%mod1;
            g2[j]=(g2[j-1]*31+a2[j]-'a'+1)%mod2;
        }

        int left=1,right=len;
        while(a1[left]==a2[left]) left++;
        while(a1[right]==a2[right]) right--;
        //printf("left=%d,right=%d\n",left,right);//

        for(int i=1;i<=n;i++)
        {
            if(R[i]-L[i]!=right-left) continue;
            long long jie1=(g1[right+Len[i]-R[i]]-g1[left-L[i]]*w29[Len[i]])%mod1;
            if(jie1<0) jie1+=mod1;
            long long jie2=(g2[right+Len[i]-R[i]]-g2[left-L[i]]*w31[Len[i]])%mod2;
            if(jie2<0) jie2+=mod2;
            //printf("jie1=%lld,jie2=%lld\n",jie1,jie2);//
            if(h1[i][Len[i]]==jie1&&h2[i][Len[i]]==jie2) ans++;
        }

        printf("%d\n",ans);
    }

    return 0;
}

/*#include<cstdio>
#include<cstring>
using namespace std;

const int nn=200005;
const int n2=nn<<1;

char a1[nn],a2[nn];

void Add(int);
void bfs1();
long long dfs1(int,int,int);
int ch[n2][26],nxt[n2],dep[n2],cnt[n2],xn;
int team[n2],tail;

long long solve();

int search(int,int,int);
int sx[n2];

int main()
{
    freopen("replace1.in","r",stdin);

    for(int i=0;i<n2;i++) sx[i]=-1;

    int n,q;
    scanf("%d%d",&n,&q);

    xn=1;

    while(n--)
    {
        scanf("%s",a1+1);
        scanf("%s",a2+1);
        Add(strlen(a1+1));
    }

    nxt[0]=nxt[1]=1;
    team[tail=1]=1;
    bfs1();

    while(q--)
    {
        scanf("%s",a1+1);
        scanf("%s",a2+1);
        printf("%lld\n",solve());
    }

    return 0;
}
void Add(int len)
{
    int u=1;
    for(int i=1;i<=len;i++)
    {
        if(!ch[u][a1[i]-'a']) dep[ch[u][a1[i]-'a']=++xn]=dep[u]+1;
        u=ch[u][a1[i]-'a'];
        if(!ch[u][a2[i]-'a']) dep[ch[u][a2[i]-'a']=++xn]=dep[u];
        u=ch[u][a2[i]-'a'];
    }
    cnt[u]++;
    return;
}
void bfs1()
{
    for(int head=1,u;head<=tail;head++)
    {
        u=team[tail];
        for(int i=0;i<26;i++)
        {
            if(ch[u][i])
            {
                nxt[ch[u][i]]=ch[nxt[u]][i];
                team[++tail]=u;
            }
            else ch[u][i]=ch[nxt[u]][i];
        }
    }

    for(int i=1;i<=xn;i++)
    {
        printf("nxt[%d]=%d ch[%d][]=",i,nxt[i],i);//
        for(int j=0;j<26;j++) printf("%d ",ch[i][j]);puts("");//
    }

    for(int i=1;i<=xn;i++)
    {
        if(!sx[nxt[i]]&&!cnt[i]) sx[i]=0;
    }

    return;
}
long long solve()
{
    int len=strlen(a1+1);
    int left=1,right=len;
    while(a1[left]==a2[left]) left++;
    while(a1[right]==a2[right]) right--;
    return dfs1(len,left,right);
}
long long dfs1(int len,int left,int right)
{
    tail=0;

    long long res=0;
    int u=1;
    for(int i=1;i<=len;i++)
    {
        u=ch[u][a1[i]-'a'];
        u=ch[u][a2[i]-'a'];
        if(!u) u=1;

        if(i>=right&&dep[u]>=right-left+1)
        {
            res+=search(u,left,right);
            printf("i=%d res=%lld\n",i,res);//
        }
    }

    while(tail)
    {
        sx[team[tail]]=-1;
        tail--;
    }

    return res;
}
int search(int u,int left,int right)
{
    printf("search-OK0 u=%d,left=%d,right=%d\n",u,left,right);//
    if(sx[u]!=-1) return sx[u];
    if(dep[u]<right-left+1) return 0;
    team[++tail]=u;
    return sx[u]=cnt[u]+search(nxt[u],left,right);
}*/
  • 与上面类似,最后全输出 00。
GX-S00425 replace.cpp
C++
#include<bits/stdc++.h>
#define ll long long
const int N=5e6+5;
using namespace std;
int n,q,m;
ll ans=0;
#define mp(x,y) make_pair(x,y)
map<pair<int,int>,int> S;
struct ACM{

    int ch[N][27],fail[N],num[N],d[N],D[N],f[N],dep[N];
    int cnt=1,flag;
    queue<int> Q;
    void insert(char s[],int n)
    {
        int x=1;
        for(int i=1,c;i<=n;i++)
        {
            c=s[i]-'a';
            if(!ch[x][c])ch[x][c]=++cnt;
            dep[ch[x][c]]=dep[x]+1;x=ch[x][c];
        }
    }
    void get_fail()
    {
        for(int i=0;i<26;i++)ch[0][i]=1;
        for(int i=0;i<26;i++){if(ch[1][i])Q.push(ch[1][i]),fail[ch[1][i]]=1,d[1]++;}
        while(!Q.empty())
        {
            int x=Q.front();Q.pop();
            for(int i=0,y;i<26;i++)
            {
                y=ch[x][i];
                if(!y)ch[x][i]=ch[fail[x]][i];
                else fail[y]=ch[fail[x]][i],Q.push(y),d[fail[x]]++;
            }
        }
    }
    void match(char s[],int n)
    {
        int x=1;
        for(int i=1,c;i<=n;i++)
        {
            c=s[i]='a';num[ch[x][c]]++;
            x=ch[x][c];
        }
    }
    void topo()
    {
        for(int i=1;i<=cnt;i++){D[i]=d[i];if(!D[i])Q.push(i);}
        while(!Q.empty())
        {
            int x=Q.front();Q.pop();f[x]+=num[x],num[x]=0;
            f[fail[x]]+=f[x];D[fail[x]]--;if(D[fail[x]]==0)Q.push(fail[x]);
            if(flag==1)
            {
                if(f[x])S[mp(dep[x],f[x])]++;
            }
            else
            {
                if(f[x])ans+=S[mp(dep[x],f[x])];
            }
        }
    }
}ac1,ac2;
char s1[N],s2[N];
void work()
{
    cin>>n>>q;
    for(int i=1;i<=q;i++)cout<<0<<"\n";
    return;
    for(int i=1;i<=n;i++)
    {
        scanf("%s",s1+1);scanf("%s",s2+1);
        //ac1.insert(s1,strlen(s1+1)),ac2.insert(s2,strlen(s2+1));
    }
    ac1.flag=1,ac2.flag=0;
    ac1.get_fail();
    ac2.get_fail();
    for(int i=1;i<=q;i++)
    {
        scanf("%s",s1+1);scanf("%s",s2+1);
        ans=0;
        ac1.match(s1,strlen(s1+1)),ac2.match(s2,strlen(s2+1));
        ac1.topo();ac2.topo();
        printf("%lld\n",ans);
    }
}
int main()
{
    freopen("replace.in","r",stdin);
    freopen("replace.out","w",stdout);
    work();
    return 0;
}
  • 可怜的线段树。
GX-S00121 road.cpp
C++
#include<algorithm>
#include<iostream>
#include<cstring>
#include<string>
#include<cstdio>
#include<cmath>
#include<stack>
#include<queue>
#include<set>
#include<map>
#define maxn 10005
#define maxm 1000005
using namespace std;

int read()
{
	int x=0,f=1;
	char c=getchar();
	while(!('0'<=c && c<='9'))
	{
		if(c=='-')
		  f=-1;
		c=getchar();
	}
	while('0'<=c && c<='9')
	{
		x=x*10+c-'0';
		c=getchar();
	}
	return x*f;
}

int n,m,k,cnt,num;
bool vis[15];//check way
int c[11];
//int dis[11][maxn+10][maxn+10];
int f[maxn+10];
long long sum,ans;

int find(int x)
{
	if(f[x]==x)
	  return x;
	return f[x]=find(f[x]);
}

struct Edge
{
	int u,v,w,id;//id ->check
	bool operator <(const Edge x1)const
	{
		return w>x1.w;
	}
}edge[maxm+10*maxn];

/*
struct Tree
{
	int l,r,val,id;
}tree[(maxn+10)<<2];

void pushup(int i)
{
	if(tree[i<<1].val<tree[i<<1|1].val)
	{
	  tree[i].val=tree[i<<1].val;
	  tree[i].id=tree[i<<1].id;
	}
	else
	{
	  tree[i].val=tree[i<<1|1].val;
	  tree[i].id=tree[i<<1|1].id;
	}
}

void build(int i,int l,int r)
{
	tree[i].l=l;
	tree[i].r=r;
	if(l==r)
	{
		tree[i].val=dis[0][1][tree[i].l];
		tree[i].id=tree[i].l;
		return ;
	}
	int mid=(l+r)>>1;
	build(i<<1,l,mid);
	build(i<<1|1,mid+1,r);
	pushup(i);
	return ;
}

int query(int i,int l,int r)
{
	return tree[1].id;
}

void updatec(int i,int x,int w)
{
	if(tree[i].l==tree[i].r)
	{
		if(tree[i].l==x)
			tree[i].val=w;
		return ;
	}
	int mid=(tree[i].l+tree[i].r)>>1;
	if(x<=mid)
	  update(i<<1,x,w);
	else
	  update(i<<1|1,x,w);
	pushup(i);
	return ;
}
void updatem(int i,int x,int w)
{
	if(tree[i].l==tree[i].r)
	{
		if(tree[i].l==x)
			tree[i].val=min(tree[i].val,w);
		return ;
	}
	int mid=(tree[i].l+tree[i].r)>>1;
	if(x<=mid)
	  update(i<<1,x,w);
	else
	  update(i<<1|1,x,w);
	pushup(i);
	return ;
}*/

long long min(long long x,long long y)
{
	return x<y?x:y;
}

void work()
{
	for(int i=1;i<=n+k;i++)
	   f[i]=i;
	priority_queue<Edge> q;
	for(int i=1;i<=cnt;i++)
	   if(vis[edge[i].id])
	     q.push(edge[i]);
	long long t=1,s=0;
	while(!q.empty())
	{
		int x=q.top().u;
		int y=q.top().v;
		if(find(x)!=find(y))
		{
			f[f[x]]=f[y];
		    s+=q.top().w;
		    if(x<=n && y<=n)
		      ++t;
  		    if(t==n)
              break;
		}
		q.pop();
	}
	ans=min(ans,s+sum);
}

void dfs(int nw)
{
	if(nw>k)
	{
		work();
		return ;
	}
	vis[nw]=true;
	sum+=c[nw];
	dfs(nw+1);
	vis[nw]=false;
	sum-=c[nw];
	dfs(nw+1);
}

int main()
{
	freopen("road.in","r",stdin);
	freopen("road.out","w",stdout);
	n=read();m=read();k=read();
	for(int i=1;i<=m;i++)
	   edge[++cnt].u=read(),edge[cnt].v=read(),edge[cnt].w=read(),edge[cnt].id=0;
	for(int i=1;i<=k;i++)
	{
		c[i]=read();
		for(int j=1;j<=n;j++)
	       edge[++cnt].u=n+i,edge[cnt].v=j,edge[cnt].w=read(),edge[cnt].id=i;
	}
	sort(edge+1,edge+cnt+1);
    /*memset(dis[0],0x3f,sizeof(dis[0]));
    for(int i=1;i<=m;i++)
    {
		int u=read();
		int v=read();
		int w=read();
		dis[0][v][u]=dis[0][u][v]=min(dis[0][u][v],w);
	}
	for(int i=1;i<=k;i++)
	{
		c[i]=read();
		for(int j=1;j<=n;j++)
		{
			int w=read();
			dis[i][n+i][j]=dis[i][j][n+i]=min(dis[i][j][n+i],w);
		}
	}*/
	sum=0,ans=0x7fffffff;
	vis[0]=true;
	dfs(1);
	printf("%lld\n",ans);
	return 0;
}
  • 辛辛苦苦写了 ∼O(2km)\sim\mathcal{O}(2^km) 做法,结果忘记判 k=0k=0 了。
GX-S00425 road.cpp
C++
#include<bits/stdc++.h>
#define ll long long
#define Max(x,y) (x > y ? x : y)
#define Min(x,y) (x < y ? x : y)
const int M=2e6+6;
const int N=1e5+5;
const ll inf=1e18;
using namespace std;
int n,m,cnt,k;
ll ans=inf,tmp;
int fa[N],C[N],in[N],siz[N];
void init()
{
    for(int i=1;i<=n+10;i++)fa[i]=i,siz[i]=1;
}
int find(int x){fa[x]=(fa[x]==x ? fa[x] : find(fa[x]));return fa[x];}
struct Edge{
    int u,v,val;
    bool operator < (const Edge e)const{
        return val<e.val;
    }
}E[M];
int count_bit(int x)
{
    int res=0;
    while(x)res+=x&1,x>>=1;
    return res;
}
ll count_val(int x)
{
    int j=1;ll res=0;
    for(int i=1;i<=10;i++)in[n+i]=0;
    while(x)
    {
        in[n+j]=(x&1);
        if(in[n+j])
        {
            res+=C[j];
        }
        x>>=1,j++;
    }
    return res;
}
ll pre=inf;
void solve(int idx)
{
    tmp=0;init();
    tmp+=count_val(idx);
    cnt=n+count_bit(idx);
    int tot=1;
    for(int i=1,u,v,w,x,y;i<=m&&tot<cnt;i++)
    {
        u=E[i].u,v=E[i].v,w=E[i].val;
        if(in[u]&&in[v])
        {
            x=find(u),y=find(v);
            if(x!=y)
            {
                if(siz[x]<siz[y]){fa[x]=y;siz[y]+=siz[x];}
                else {fa[y]=x;siz[x]+=siz[y];}
                tot++;tmp+=w;
            }
        }
    }
    ans=Min(ans,tmp);
}
void work()
{
    cin>>n>>m>>k;
    //cout<<(m+n*k)<<"\n";
    for(int i=1,u,v,w;i<=m;i++)
    {
        scanf("%d%d%d",&u,&v,&w);
        E[i]={u,v,w};
    }
    for(int i=1;i<=n;i++)in[i]=1;
    ll sum=0;
    for(int i=1;i<=k;i++)
    {
        scanf("%d",&C[i]);sum+=C[i];
        for(int j=1,x;j<=n;j++)
        {
            scanf("%d",&x);sum+=x;
            E[++m]={n+i,j,x};
        }
    }
    if(!sum)
    {
        printf("%d\n",0);
        return ;
    }
    sort(E+1,E+1+m);
    int IDX=(1<<k);
    for(int idx=0;idx<IDX;idx++)
    {
        solve(idx);
    }

    printf("%lld\n",ans);
}
int main()
{
    freopen("road.in","r",stdin);
    freopen("road.out","w",stdout);
    work();
    return 0;
}
  • 为什么要在这些题输出 −1-1 呢。
GX-S00367 employ.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int main(){
	freopen("employ.in","r",stdin);
	freopen("employ.out","w",stdout);
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	cout<<-1;
	return 0;
}
剩下的
  • GX-S00431:road.cpp、replace.cpp、employ.cpp。
  • 工程型 dsu。
GX-S00430 road.cpp
C++
#include <bits/stdc++.h>
using namespace std;

class DisjointSet{
private:
    int comp_cnt;
    vector<int> parent;
    vector<int> sizes;

public:
    DisjointSet(int size) : comp_cnt(size), parent(size), sizes(size, 1) {
        for (int i = 0; i < size; i++) parent[i] = i;
    }

    int find(int x) {return parent[x] == x ? x : parent[x] = find(parent[x]);}

    bool unite(pair<int, int> edge){
        int x_root = find(edge.first);
        int y_root = find(edge.second);
        if (x_root == y_root) return false;

        comp_cnt--;
        if (sizes[x_root] < sizes[y_root]) swap(x_root, y_root);
        parent[y_root] = x_root;
        sizes[x_root] += sizes[y_root];
        return true;
    }

    bool full_connected() {return (comp_cnt == 1);}
};

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

    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int node_num, edge_num, build_num;
    cin >> node_num >> edge_num >> build_num;

    vector<pair<long long, pair<int, int>>> edges(edge_num);
    for (auto &it : edges){
        cin >> it.second.first >> it.second.second >> it.first;
        it.second.first--, it.second.second--;
    }
    sort(edges.begin(), edges.end());

    DisjointSet raw_dsu(node_num);
    vector<pair<long long, pair<int, int>>> useful_edges;
    for (auto it : edges){
        if (raw_dsu.full_connected()) break;
        if (raw_dsu.unite(it.second)) useful_edges.push_back(it);
    }

    vector<long long> build_cost(build_num);
    vector<vector<long long>> new_edges_cost(build_num, vector<long long>(node_num));
    for (int i = 0; i < build_num; i++){
        cin >> build_cost[i];
        for (int j = 0; j < node_num; j++) cin >> new_edges_cost[i][j];
    }

    long long ans = LLONG_MAX;
    for (int mask = 0; mask < (1 << build_num); mask++){
        long long total_cost = 0;

        int node_cnt = node_num;
        vector<pair<long long, pair<int, int>>> new_edges = useful_edges;
        for (int i = 0; i < build_num; i++){
            if (mask & (1 << i)){
                total_cost += build_cost[i];
                for (int j = 0; j < node_num; j++) new_edges.push_back({new_edges_cost[i][j], {node_cnt, j}});
                node_cnt++;
            }
        }
        sort(new_edges.begin(), new_edges.end());

        DisjointSet dsu(node_cnt);
        for (auto it : new_edges){
            if (dsu.full_connected()) break;
            if (dsu.unite(it.second)) total_cost += it.first;
        }

        ans = min(ans, total_cost);
    }

    cout << ans << "\n";
    return 0;
}
  • 请注意:memset(1) 是不可名状物。
GX-S00384 employ.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int mod=998244353;
int nn[1000],c[1000];
bool ss[100];
int n,m,t,sum=0;
int p[1000];
void exam(){
for(int i=1;i<=n;i++){
    if(ss[i]==0||c[i]==0){
        nn[i]=0;
        c[i+1]--;
    }
}
}
void choise(){
for(int i=1;i<=n;i++){
        sum+=nn[i];
        if(sum<sum-nn[i]) {
        sum-=nn[i];
    }
        else{
            sum+=nn[i];
            p[i]=nn[i];
        }
}
if(sizeof(p)<m) {choise();}
}
int main(){
freopen("employ.in","r",stdin);
freopen("employ.out","w",stdout);
memset(p,0,sizeof(p));
memset(nn,1,sizeof(nn));
cin>>n>>m;
int s,t=1;
cin>>s;
for(int i=1;i<=n;i++)
    cin>>c[i];
sort(c,c+1);
for(int i=1;i<=t;i++){
    ss[i]=s%10;
    t++;
    s%=10;
}
exam();
choise();
for(int i=1;i<=n;i++){
    int pp;
    pp+=p[i];
    if(pp==m){
        t++;
    }
}
cout<<t;
fclose(stdin);
fclose(stdout);
return 0;
}

代码艺术类

  • 这个飞来飞去的注释是怎么做到的。
GX-S00624 club.cpp
C++
/*#include<bits/stdc++.h>
//using namespace std;
//typedef long long ll;
//typedef unsigned long long ull;
//const int N = 4e5;
//const int I = 1e5 + 7;
//const int M = 2e4 + 7;
//int T, n;
//ll  a[N][5], asn, lim[N][5], tot, biao[5000008];
//inline void dfs(int ceil, ll cnt, ll maxx)
//{
 //   ll sum = 0;
   // if(ceil == n)
    //{
//        for(int i = 1; i <= 3; ++i)
  //      {
    //        if(lim[ceil - 1][i] < maxx)
      //      {
        //        cnt += a[ceil][i];
          //      tot++;
            //    biao[tot] = cnt;
              //  cnt -= a[ceil][i];
      ///      }
        //}
    //}
   // else
   // {
     //   for(int i = 1; i <= 3; ++i)
       //     lim[ceil][i] = lim[ceil - 1][i];
      //  for(int i = 1; i <= 3; ++i)
        //{
        //    if(lim[ceil][i] < maxx)
        //    {
          //      cnt += a[ceil][i];
           //     lim[ceil][i]++;
             //   if(lim[ceil][1] < maxx)
               // {
                //    dfs(ceil+1, cnt, maxx);
               // }
               // if(lim[ceil][2] < maxx)
                //{
                 //   dfs(ceil+1, cnt, maxx);
                //}
                //if(lim[ceil][3] < maxx)
                //{
                  //  dfs(ceil+1, cnt, maxx);
               // }
                //cnt -= a[ceil][i];
          //  }
        //}
    //}
//}
//int main()
//{
 //   freopen("club.in", "r", stdin);
  //  freopen("club.out", "w", stdout);
   // ios::sync_with_stdio(0);
    //cin.tie(0);
   // cin >> T;
//    while(T--)
  //  {
    //    cin >> n;
      //  ll maxx = n / 2;
       // asn = tot = 0;
      //  memset(a, 0, sizeof(a));
       // memset(biao, 0, sizeof(biao));
        //memset(lim, 0, sizeof(lim));
        ///for(int i = 1; i <= n; ++i)
           // for(int j = 1; j <= 3; ++j)
             //   cin >> a[i][j];
       // for(int i = 1; i <= 3; ++i)
        //{
          //  lim[1][i]++;
            //dfs(2, lim[1][i], maxx);
            //lim[1][i]--;
      //  }
        //for(ll i = 1; i <= tot; ++i)
//            asn = max(asn, biao[i]);
  //      cout << asn << "\n";
    //}
    //return 0;
//}*/
  • 楼梯状注释。
GX-S00458 club.cpp
C++
        sort(p3 + 1, p3 + cnt3 + 1, cmp3);
    //    for(int i = 1; i <= cnt1; i++){
  //          cout << p1[i].i;
//        }
        //cout << '\n';
      //  for(int i = 1; i <= cnt2; i++){
    //        cout << p2[i].j;
  //      }
//        cout << '\n';
        //for(int i = 1; i <= cnt3; i++){
      //      cout << p3[i].k;
    //    }
  //      cout << '\n';
//        cout << ans << '\n';
        while(cnt1 > n / 2){
  • 用斜杠划分代码区域。
GX-S00560 club.cpp
C++
void dfs(int level, int num)
{

    if(level == n)
    {
        if(num > maxx && d1 <= n / 2 && d2 <= n / 2 && d3 <= n / 2) maxx = num;
        return;
    }
    if(d1 > n / 2) return;
    if(d2 > n / 2) return;
    if(d3 > n / 2) return;
    ////////////////////////////////////////////////////
    c1[d1] = ar[level][0];
    d1++;
    dfs(level + 1, num + ar[level][0]);
    d1--;
    c1[d1] = 0;
    ////////////////////////////////////////////////////
    c2[d2] = ar[level][1];
    d2++;
    dfs(level + 1, num + ar[level][1]);
    d2--;
    c2[d2] = 0;
    ////////////////////////////////////////////////////
    c3[d3] = ar[level][2];
    d3++;
    dfs(level + 1, num + ar[level][2]);
    d3--;
    c3[d3] = 0;
    ////////////////////////////////////////////////////
    return;

}

后话

本文基本由我一个人完成。有 33 项由选手本人亲自提供。期间使用了 deepseek 生成的注释提取工具(虽然连正则都是错的),但是还是自己把所有代码都翻了一遍,所以做得很慢,对不起。

欢迎大家加入 GXOI 交流群:322611329。

如果有遗漏或者格式炸了的,私信我或者在群里提出,或者在共享表格里补充。也欢迎在 J 组部分中填一填找到的有意思的东西,目前 J 组部分还是空的。

J 组不一定做得了了,已经燃尽了。