前言
话说今天好像放做题导致BBB组贼难AAA组还好。
成绩
JJJ表示初中,HHH表示高中后面加的是几年级
RankRankRank | PersonPersonPerson | ScoreScoreScore | AAA | BBB | CCC |
---|---|---|---|---|---|
101010 | (J−2)WYC(J-2)WYC(J−2)WYC | 250250250 | 100100100 | 100100100 | 505050 |
282828 | (J−2)ZYC(J-2)ZYC(J−2)ZYC | 200200200 | 100100100 | 100100100 | 000 |
474747 | (J−2)LRZ(J-2)LRZ(J−2)LRZ | 150150150 | 505050 | 100100100 | 000 |
525252 | (J−2)XJQ(J-2)XJQ(J−2)XJQ | 100100100 | 000 | 100100100 | 000 |
525252 | (H−1)HJW(H-1)HJW(H−1)HJW | 100100100 | 100100100 | 000 | 000 |
525252 | (J−2)LW(J-2)LW(J−2)LW | 100100100 | 100100100 | 000 | 000 |
585858 | (J−2)HJQ(J-2)HJQ(J−2)HJQ | 909090 | 909090 | 000 | 000 |
616161 | (J−2)HZB(J-2)HZB(J−2)HZB | 303030 | 303030 | 000 | 000 |
正题
T1:jzoj3236−T1:jzoj3236-T1:jzoj3236−矮人排队【权值线段树】
链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/95462316
T2:jzoj3237−T2:jzoj3237-T2:jzoj3237−间谍派遣【最小生成树,,,并查集】
链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/95473654
T3:bzoj3482,jzoj3238−T3:bzoj3482,jzoj3238-T3:bzoj3482,jzoj3238−超时空旅行hiperprostorhiperprostorhiperprostor【最短路,,,凸包,,,斜率优化】
链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/95491246
someofcodesome\ of\ codesome of code
T350T3\ 50T3 50分codecodecode
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
const int N=1100;
struct node{int x,y,w;
}a[N*N];
int n,tot,ans,fa[N],cost[N];
bool cmp(node x,node y)
{return x.w<y.w;}
int find(int x)
{if(fa[x]==x) return x;return fa[x]=find(fa[x]);
}
void unionn(int x,int y)
{int Fa=find(x),Fb=find(y);if(Fa<Fb) fa[Fb]=Fa,cost[Fa]=min(cost[Fa],cost[Fb]);else fa[Fa]=Fb,cost[Fb]=min(cost[Fa],cost[Fb]);return;
}
int main()
{scanf("%d",&n);for(int i=1;i<=n;i++)for(int j=1;j<=n;j++){int x;scanf("%d",&x);a[++tot].x=i;a[tot].y=j;a[tot].w=x;}for(int i=1;i<=n;i++)scanf("%d",&cost[i]),fa[i]=i,ans+=cost[i];sort(a+1,a+1+tot,cmp);for(int i=1;i<=tot;i++){int fx=find(a[i].x),fy=find(a[i].y);if(fx==fy||a[i].w>max(cost[fx],cost[fy])) continue;ans-=max(max(cost[fx],cost[fy])-a[i].w,0);unionn(fx,fy);}printf("%d",ans);
总结
看起来十分可做然后T1T2T1T2T1T2一眼正解,T3T3T3半天啥都看不出来就写了个暴力505050
:|\color{darkblue}\texttt{:|}:|
最后的最后
木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大\texttt{木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大}木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大木大