前言
TodayisthepenultimatedayToday\ is\ the penultimate dayToday is thepenultimateday
成绩
RankRankRank是有算别人的
RankRankRank | PersonPersonPerson | ScoreScoreScore | AAA | BBB | CCC |
---|---|---|---|---|---|
333 | 2017zyc2017zyc2017zyc | 250250250 | 909090 | 100100100 | 606060 |
101010 | 2017xxy2017xxy2017xxy | 220220220 | 202020 | 100100100 | 100100100 |
212121 | 2017lrz2017lrz2017lrz | 180180180 | 202020 | 100100100 | 606060 |
212121 | 2017wyc2017wyc2017wyc | 180180180 | 303030 | 505050 | 100100100 |
545454 | 2017xjq2017xjq2017xjq | 110110110 | 000 | 505050 | 606060 |
727272 | 2017hzb2017hzb2017hzb | 808080 | 000 | 202020 | 606060 |
818181 | 2017lw2017lw2017lw | 707070 | 000 | 101010 | 606060 |
888888 | 2017hjq2017hjq2017hjq | 606060 | 000 | 000 | 606060 |
正题
T1:jzoj4252−T1:jzoj4252-T1:jzoj4252−QYQ的图【dfsdfsdfs】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86702752
T2:jzoj4248−nT2:jzoj4248-nT2:jzoj4248−n染色【数学,快速幂】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86703758
T3:jzoj4249−T3:jzoj4249-T3:jzoj4249−游戏【贪心】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86703879
someofcodesome\ of\ codesome of code
T1 30分code
#include<cstdio>
#include<algorithm>
using namespace std;
const int N=60;
int tot,in[N],ans,w[N],flag[N],n,maxs,m;
bool v[N],a[N][N],zh[N];
void dfs(int x)
{in[++tot]=x;v[x]=1;ans+=w[x];for(int i=1;i<=n;i++)if(a[x][i]&&!v[i])dfs(i);
}
void get_ans(int dep,int z)
{if(dep>tot){maxs=max(maxs,z);return;}get_ans(dep+1,z);if(!flag[dep]&&!zh[in[dep]]){for(int i=1;i<=tot;i++)if(a[in[dep]][in[i]])flag[i]++;get_ans(dep+1,z+w[in[dep]]);for(int i=1;i<=tot;i++)if(a[in[dep]][in[i]])flag[i]--;}
}
int main()
{freopen("graph.in","r",stdin);freopen("graph.out","w",stdout);scanf("%d%d",&n,&m);for(int i=1;i<=n;i++)scanf("%d",&w[i]);for(int i=1;i<=m;i++){int x,y;scanf("%d%d",&x,&y);if(x==y) zh[x]=1;a[x][y]=a[y][x]=1;}for(int i=1;i<=n;i++){maxs=0;tot=0;dfs(i);get_ans(1,0);ans-=maxs;}printf("%d",ans);
}
T2 50分code
#include<cstdio>
#define ll long long
using namespace std;
const ll XJQ=1e9+7;
ll n,m,ans,f[100010][15];
int main()
{freopen("color.in","r",stdin);freopen("color.out","w",stdout);scanf("%lld%lld",&n,&m);f[1][1]=1;for(ll i=2;i<=n+1;i++)for(ll j=1;j<=m;j++)for(ll k=1;k<=m;k++)if(k!=j)(f[i][j]+=f[i-1][k])%=XJQ;printf("%lld",f[n+1][1]*m%XJQ);
}
总结
爆炸了
T1不会,去写T2,然后写了个错的。之后写T3,开始写dp,后来发现可以贪心,切掉。然后T1写了个暴力(我还证明了暴力可过),结果写挂了,炸掉30。然后T2找了半天规律,最后二分钟开始写,结果时间不够,只有之前那个50分codeQVQ
尾声
雷大爷险些Rank1Rank1Rank1