跳到正文

个人记录

CSP2025 ZJ 迷惑行为大赏

__ikun__horro__约 11 分钟
原文

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

文章信息与版本

文章信息

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

版本

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

方正篇

ZJ-S00021

代码
/home/ikun/code/event/csp2025/csps/ZJ-S00021/club/club.cpp
  38,15: 	freopen("club.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S00021/employ/employ.cpp
  32,17: 	freopen("employ.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S00021/replace/replace.cpp
  5,18: 	freopen("replace.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S00021/road/road.cpp
  7,15: 	freopen("road.ans","w",stdout);

ZJ-S00362

代码
/home/ikun/code/event/csp2025/csps/ZJ-S00362/club/club.cpp
  75,15: 	freopen("club.ans","w",stdout);

ZJ-S00428

代码
/home/ikun/code/event/csp2025/csps/ZJ-S00428/replace/replace.cpp
  12,18: 	freopen("replace.ans","r",stdin);

ZJ-S00457

代码
/home/ikun/code/event/csp2025/csps/ZJ-S00457/club/club.cpp
  64,15: 	freopen("club.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S00457/employ/employ.cpp
  37,17: 	freopen("employ.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S00457/replace/replace.cpp
  42,18: 	freopen("replace.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S00457/road/road.cpp
  8,15: 	freopen("road.ans","w",stdout);

ZJ-S00952

代码
/home/ikun/code/event/csp2025/csps/ZJ-S00952/replace/replace.cpp
  17,18: 	freopen("replace.ans","w",stdout);

ZJ-S01185

代码
/home/ikun/code/event/csp2025/csps/ZJ-S01185/club/club.cpp
  89,18:     freopen("club.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S01185/employ/employ.cpp
  25,20:     freopen("employ.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S01185/replace/replace.cpp
  61,22:      freopen("replace.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S01185/road/road.cpp
  43,18:     freopen("road.ans","w",stdout);

ZJ-S01438

代码
/home/ikun/code/event/csp2025/csps/ZJ-S01438/club/club.cpp
  28,18:     freopen("club.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S01438/employ/employ.cpp
  35,20:     freopen("employ.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S01438/replace/replace.cpp
  41,21:     freopen("replace.ans","w",stdout);

/home/ikun/code/event/csp2025/csps/ZJ-S01438/road/road.cpp
  85,18:     freopen("road.ans","w",stdout);

言语篇

英语巨佬,根本看不懂

代码
/home/ikun/code/event/csp2025/csps/ZJ-S00140/club/club.cpp
C++
#define int long long    //3 years oi a void, no long long would see father^INF
using namespace std;

//EZ!
//i would get 3rd prize if my program has no mistakes

//fuck
//this problem is the one i'm only able to solve
//but i think i can get 116pts
//hoping this score can bring a 3rd prize



//From miles away
//Flew to find how it is ending u(ending u)
//----Chronicle A(en. ver)

《消除证据》

代码
/home/ikun/code/event/csp2025/csps/ZJ-S00384/road/road.cpp
C++
#include<bits/stdc++.h>
using namespace std;
//const int Fuck_CCF=114514;
int n,m,k,xcl[10][10005],xc[15];
map<int ,int >e[10005];
//long long ans[10005]={1000000000};
//int lt[10005];
int main(){
	freopen("road.in","r",stdin);
	freopen("road.out","w",stdout);
	cin>>n>>m>>k;
	for(int i=1;i<=m;i++){
		int u,v,w;
		cin>>u>>v>>w;
		e[u][v]=w;
		e[v][u]=w;
	}
	for(int i=1;i<=k;i++){
		cin>>xc[i];
		for(int j=1;j<=n;j++){
			cin>>xcl[i][j];
		}
	}
	cout<<0;
	return 0;
}

.

代码
/home/ikun/code/event/csp2025/csps/ZJ-S01573/club/club.cpp
C++
#include<bits/stdc++.h>
using namespace std;
int t,n,f[100005];
struct stu{
	int x,y,z;
}a[100005];
bool cmp(stu x,stu y){
	int mx=max(x.x,max(x.y,x.z)),my=max(y.x,max(y.y,y.z));
	if(mx>my)return true;
	if(mx==my){
		if(x.x>y.x)return true;
		if(x.y>y.y)return true;
		if(x.z>y.z)return true;
	}
	else return false;
}
bool cmp1(stu x,stu y){
	return x.x>y.x;
}
bool cmp2(stu x,stu y){
	return x.x>x.y;
}
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	freopen("club.in","r",stdin);
	freopen("club.out","w",stdout);
	cin>>t;
	while(t--){
		cin>>n;
		int sum1=0,sum2=0,sum3=0,ans=0,num1=0,num2=0;
		for(int i=1;i<=n;i++){
			int d,e,f;
			cin>>d>>e>>f;
			a[i].x=d,a[i].y=e,a[i].z=f;
			sum1+=d,sum2+=e,sum3+=f;
		}
		if(sum3==0){
			if(sum2==0){
				sort(a+1,a+1+n,cmp1);
				for(int i=1;i<=n>>1;i++)ans+=a[i].x;
				cout<<ans;
				continue;
			}
			sort(a+1,a+1+n,cmp2);
			int FUCKCCF;
			for(int i=1;i<=n;i++){
				if(a[i].x<a[i].y){
					FUCKCCF=i;
					break;
				}
			}
			if(FUCKCCF<=n/2)for(int i=1;i<=FUCKCCF;i++)num1+=a[i].x;
			else{
				for(int i=1;i<=n/2;i++)num1+=a[i].x;
				for(int i=n/2+1;i<=n;i++)num2+=a[i].y;
			}
			cout<<num1+num2<<endl;
			continue;
		}
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		int maxo=n>>1,c1=0,c2=0,c3=0;
		sort(a+1,a+1+n,cmp);
		for(int i=1;i<=n;i++){
			int md=0;
			if(a[i].x>a[i].y&&a[i].y>a[i].z)md=1;
			if(a[i].y>a[i].x&&a[i].y>a[i].z)md=2;
			if(a[i].z>a[i].y&&a[i].z>a[i].x)md=3;
			if(md==1&&c1<maxo||!md&&a[i].x==a[i].y&&c1<maxo||!md&&a[i].x==a[i].z&&c1<maxo){
				c1++;
				ans+=a[i].x;
				continue;
			}
			else if(md==2&&c2<maxo||!md&&a[i].x==a[i].y&&c2<maxo||!md&&a[i].y==a[i].z&&c2<maxo){
				c2++;
				ans+=a[i].y;
				continue;
			}
			else if(md==3&&c3<maxo||!md&&a[i].x==a[i].z&&c3<maxo||!md&&a[i].y==a[i].z&&c3<maxo){
				c3++;
				ans+=a[i].z;
				continue;
			}
			else{
				if(c1<maxo){
					c1++;
					ans+=a[i].x;
				}
				else if(c2<maxo){
					c2++;
					ans+=a[i].y;
				}
				else if(c3<maxo){
					c3++;
					ans+=a[i].z;
				}
			}
		}
		cout<<ans<<endl;
	}
	return 0;
}

待更新。。。