CSP2025游记

· · 生活·游记

坐标HN-S00249,参见 https://www.luogu.com.cn/article/e9d67r7v 中的求关人(问题是我不是人,我是猫 ~已成为疯猫~,~我们班只有疯子~)。

  • CSP2024 入门 一等奖 260 / 400
  • CSP2024 提高 二等奖 95 / 400

今年 J 400,S 252

Day-2

苹果一整年要我们刷板子

提高组模板(hard)

一下午干了 30 道题,25 AC。

Day-1

上午

PTY 给我们讲注意事项。。。

下午

已解决 1 / 1 AR 文艺平衡树

Day1

上午

上善若水

可以可见选手文件有图片 ## 下午 人杰地灵 $N$ 个认识的人和我一个考场(WYN HJC LRH LPL CSX ???),西西弗太厉害了 CSX 一进来,就问怎么打开小恐龙 先写了 T1 & T2 的暴力。 ???分钟改 T1,$60$ 分。 T2 想到了解法: ```cpp #include<bits/stdc++.h> typedef int int32; #define int long long using namespace std; /* Author: wbw_121124 人杰地灵 road.cpp */ const int N = 1e4 + 5; int n,m,k,a[15][N],c[N],fa[N+15],cnt,ans,cntt[15]; struct node{ int x,y,z; bool operator<(const node& u) const { return z<u.z; } }b[N*100],d[N*110],f[15][N]; int find(int x) { return x==fa[x]?x:fa[x]=find(fa[x]); } void unionn(int x,int y) { x=find(x); y=find(y); if(x!=y) fa[x]=y; return; } signed main() { freopen("road.in","r",stdin); freopen("road.out","w",stdout); ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); cin>>n>>m>>k; for(int i=1;i<=m;i++) cin>>b[i].x>>b[i].y>>b[i].z; for(int i=1;i<=k;i++) { cin>>c[i]; for(int j=1;j<=n;j++) cin>>a[i][j]; } int sum=0,tot=0; cnt=0; for(int j=1;j<=n;j++) fa[j]=j; for(int j=1;j<=m;j++) d[++cnt]=b[j]; sort(d+1,d+1+m); for(int j=1;j<=cnt;j++) if(find(d[j].x)!=find(d[j].y)) { sum+=d[j].z; unionn(d[j].x,d[j].y); tot++; b[tot]=d[j]; if(tot==n-1) break; } for(int i=1;i<=k;i++) for(int j=1;j<=n;j++) if(a[i][j]<=b[n-1].z) f[i][++cntt[i]]={n+i,j,a[i][j]}; ans=sum; for(int i=1;i<(1ll<<k);i++) { sum=tot=cnt=0; for(int j=1;j<=n+k;j++) fa[j]=j; for(int j=1;j<n;j++) d[++cnt]=b[j]; int tmp=0; for(int j=1;j<=k;j++) if((i>>(j-1))&1) { tmp++; sum+=c[j]; for(int l=1;l<=cntt[j];l++) d[++cnt]=::f[j][l]; } sort(d+1,d+1+cnt); int tot=0; for(int j=1;j<=cnt;j++) if(find(d[j].x)!=find(d[j].y)) { sum+=d[j].z; unionn(d[j].x,d[j].y); if(++tot==n+tmp-1) break; } ans=min(ans,sum); } cout<<ans; // cerr<<clock()<<'\n'; return 0; } ``` T3 trie 骗了 $80pts$。 T4 骗了 $12pts$。 然后发电了。 这里的电脑太好了,我左边的元素之神(幻丶影)的电脑的内存条有问题,一些地方不能写入。 不是,他放 D 盘的代码,居然不见了(神奇 win7,和 noi-linux 中虚拟 noi-linux 一样流畅) # 后记 ~P 话:~ $60+100+80+12=252$ wssb. ```cpp ///* // Author: wbw_121124 // 在洛谷(luogu)上关注我 // 我要入选HN的集合 // 炸了 // 人杰地灵 // club.cpp // // t1 没必要反悔贪心吧 // // t1 是反悔贪心!!! // t1 是反悔贪心!!! // t1 是反悔贪心!!! // // wwwwwwwwwwwwwwwwwwwww //*/ ``` > pty 的 $O(2^km)$ 竟然过了,太可恶了 fAKe 怎么你了: > 举报系统通知 11-05 23:14 你发表的 CSP-S2025求助 因被多人举报而被系统自动删除,多次被举报将被处以禁言、封禁账号等处罚。 > $\frac{2}{3}$ 个物理课代表,和 $\frac{1}{3}$ 个化学课代表在水本本 > @Sunset_afterglow : wbw老傻子学妹王 || @wbw_121124 : CSP-S 比 @Moya_Rao 去年高 > The teaching building instantly dispels all worries. || @yinjunrui : **教学楼,一跃解千愁 <https://www.luogu.com.cn/discuss/1186520>(考前发的,你在指谁): > @[Sunrise_beforeglow](https://www.luogu.com.cn/user/812227):@wbw_121124 教主把你打包送给雪梅 真·at错帖子了,YYB 是故意的: > @[\_yang\_yi\_bo\_ ](https://www.luogu.com.cn/user/1265919):@Moya_Rao > > @[\_yang\_yi\_bo\_ ](https://www.luogu.com.cn/user/1265919):@Moya_Rao at错帖子了 > > @[Moya_Rao](https://www.luogu.com.cn/user/814130):@yang\_yi\_bo 满屏问号 > > @wbw_121124:@Moya_Rao被单调队列了 > > @[Moya_Rao](https://www.luogu.com.cn/user/814130):@wbw_121124 【】对不起但是我现在已经没有实力单调你们所有人了