前言
昨天:
MdMdMd今天还真爆零了
顺便%%%ZZYRank1\%\%\%ZZY\ Rank1%%%ZZY Rank1
成绩
JJJ表示初中,HHH表示高中后面加的是几年级
RankRankRank | PersonPersonPerson | ScoreScoreScore | AAA | BBB | CCC |
---|---|---|---|---|---|
111 | (H−1)ZZY(H-1)ZZY(H−1)ZZY | 150150150 | 202020 | 303030 | 100100100 |
333 | (H−1)WHF(H-1)WHF(H−1)WHF | 120120120 | 202020 | 000 | 100100100 |
363636 | (J−3)XXY(J-3)XXY(J−3)XXY | 404040 | 000 | 101010 | 303030 |
363636 | (J−3)ZYC(J-3)ZYC(J−3)ZYC | 404040 | 000 | 404040 | 000 |
363636 | (J−3)LRZ(J-3)LRZ(J−3)LRZ | 404040 | 000 | 101010 | 303030 |
444444 | (J−3)HZB(J-3)HZB(J−3)HZB | 303030 | 000 | 000 | 303030 |
646464 | (H−1)QYH(H-1)QYH(H−1)QYH | 202020 | 202020 | 000 | 000 |
757575 | (J−3)LW(J-3)LW(J−3)LW | 000 | 000 | 000 | 000 |
757575 | (H−2)HJW(H-2)HJW(H−2)HJW | 000 | 000 | 000 | 000 |
757575 | (H−2)LZX(H-2)LZX(H−2)LZX | 000 | 000 | 000 | 000 |
757575 | (J−3)WYC(J-3)WYC(J−3)WYC | 000 | 000 | 000 | 000 |
正题
T1:jzoj3736−[NOI2014T1:jzoj3736-[NOI2014T1:jzoj3736−[NOI2014模拟7.11]7.11]7.11]数学题(math)(math)(math)【计算几何】
链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/99098615
T2:jzoj3737−[NOI2014T2:jzoj3737-[NOI2014T2:jzoj3737−[NOI2014模拟7.11]7.11]7.11]挖宝藏(treasure)(treasure)(treasure)【斯坦纳树,SPFA,,SPFA,,SPFA,状压】
链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/99102463
T3:jzoj3738−[NOI2014T3:jzoj3738-[NOI2014T3:jzoj3738−[NOI2014模拟7.11]7.11]7.11]理想城市(city)(city)(city)【树,,,模型转换】
链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/99104932
总结
一看T1T1T1没学过向量,T2T2T2好像很难,T3T3T3也很诡异。今天三题赶脚都不可做,有一种啥都不会的赶脚。发现T2T2T2好像有些可做就刚了一个小时多两个小时,然后瞬间爆炸没写出了。这时候XJQXJQXJQ告诉了我T1T1T1的向量运算,然后推了二十分钟多不会。然后看T3T3T3诶这个不是可以变成树形结构吗???然后就愉快刚了半天到比赛结束也没写暴力。
后来发现应该横竖各来一次。
ba说了,爆蛋
SomeofcodeSome\ of\ codeSome of code
T2WAcodeT2\ WA\ codeT2 WA code
#include<cstdio>
#include<cstring>
#include<algorithm>
#define p(x,y) ((x-1)*m+y)
using namespace std;
const int N=11,dx[4]={0,0,1,-1},dy[4]={1,-1,0,0};
struct node{int x,y,w;
}e[N*N];
int h,n,m,a[N][N][N],skr[N][N][N],f[N][N*N][N*N],num[N],K[N],fa[N],ans,cnt,zans,v[N*N];
int find(int x)
{return fa[x]==x?x:find(fa[x]);}
void unionn(int x,int y)
{int Fa=find(x),Fb=find(y);if(Fa==Fb) return;if(Fa<Fb) fa[Fb]=Fa;else fa[Fa]=Fb;
}
bool cmp(node x,node y)
{return x.w<y.w;}
int main()
{freopen("treasure.in","r",stdin);freopen("treasure.out","w",stdout);scanf("%d%d%d",&h,&n,&m);for(int i=1;i<=h;i++)for(int j=1;j<=n;j++)for(int k=1;k<=m;k++)scanf("%d",&a[i][j][k]);memset(f,0x3f,sizeof(f));memset(skr,0x3f,sizeof(skr));memset(skr[0],0,sizeof(skr[0]));for(int z=1;z<=h;z++){for(int i=1;i<=n;i++)for(int j=1;j<=m;j++){fa[p(i,j)]=p(i,j);f[z][p(i,j)][p(i,j)]=0;for(int k=0;k<4;k++){int zx=i+dx[k],zy=j+dy[k];if(zx<1||zy<1||zx>n||zy>m) continue;f[z][p(i,j)][p(zx,zy)]=0;}v[p(i,j)]=a[z][i][j];}for(int k=1;k<=n*m;k++)for(int i=1;i<=n*m;i++)for(int j=1;j<=n*m;j++)f[z][i][j]=min(f[z][i][j],f[z][i][k]+f[z][k][j]+v[k]);scanf("%d",&K[z]);int maxs=0;for(int j=1;j<=K[z];j++){int x,y;scanf("%d%d",&x,&y);num[j]=p(x,y);maxs+=a[z][x][y];}K[z]++;for(int x1=1;x1<=n;x1++)for(int y1=1;y1<=m;y1++){ans=0;cnt=0;num[K[z]]=p(x1,y1);for(int i=1;i<K[z];i++)if(num[i]==p(x1,y1)) ans=-a[z][x1][y1];for(int i=1;i<=K[z];i++)fa[num[i]]=num[i];for(int i=1;i<=K[z];i++)for(int j=i+1;j<=K[z];j++)e[++cnt]=(node){num[i],num[j],f[z][num[i]][num[j]]};sort(e+1,e+1+cnt,cmp);for(int i=1;i<=cnt;i++){int Fa=find(e[i].x),Fb=find(e[i].y);if(Fa==Fb) continue;if(Fa<Fb) fa[Fb]=Fa;else fa[Fa]=Fb;ans+=e[i].w;}ans+=skr[z-1][x1][y1]+maxs+a[z][x1][y1];skr[z][x1][y1]=min(skr[z][x1][y1],ans);for(int x2=1;x2<=n;x2++)for(int y2=1;y2<=m;y2++)skr[z][x2][y2]=min(skr[z][x2][y2],ans+f[z][p(x1,y1)][p(x2,y2)]+a[z][x2][y2]); }if(K[z]==1) continue;ans=2147483647;for(int x1=1;x1<=n;x1++)for(int y1=1;y1<=m;y1++)ans=min(ans,skr[z][x1][y1]);zans=ans;}printf("%d",zans);
}
话说
欢迎来到SSLSSLSSL复读小群