前言
心态爆炸
成绩
RankRankRank是有算别人的
RankRankRank | PersonPersonPerson | ScoreScoreScore | AAA | BBB | CCC | DDD |
---|---|---|---|---|---|---|
333 | 2017myself2017myself2017myself | 190190190 | 100100100 | 505050 | 000 | 404040 |
131313 | 2017zyc2017zyc2017zyc | 170170170 | 707070 | 606060 | 000 | 404040 |
131313 | 2017hzb2017hzb2017hzb | 170170170 | 100100100 | 707070 | 000 | 000 |
222222 | 2017xjq2017xjq2017xjq | 150150150 | 100100100 | 505050 | 000 | 000 |
333333 | 2017lrz2017lrz2017lrz | 130130130 | 808080 | 505050 | 000 | 000 |
444444 | 2017lw2017lw2017lw | 100100100 | 404040 | 606060 | 000 | 000 |
575757 | 2017xxy2017xxy2017xxy | 909090 | 404040 | 505050 | 000 | 000 |
575757 | 2017hjq2017hjq2017hjq | 909090 | 404040 | 505050 | 000 | 000 |
正题
T1:jzoj4235−T1:jzoj4235-T1:jzoj4235−序列【斐波那契数列】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86679575
T2:jzoj4226−AT2:jzoj4226-AT2:jzoj4226−A【图论】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86679695
T3:jzoj4227−BT3:jzoj4227-BT3:jzoj4227−B【dp,dp,dp,字符串】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86679832
T4:jzoj4228−CT4:jzoj4228-CT4:jzoj4228−C【dpdpdp】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86679939
someofcodesome\ of\ codesome of code
T2 30分code
#include<cstdio>
#include<algorithm>
#define ll long long
using namespace std;
const ll N=100010;
ll n,m,k,wall[N],ans;
int main()
{scanf("%lld%lld%lld",&n,&m,&k);for(ll i=1;i<=m;i++){ll x,y;scanf("%lld%lld",&x,&y);wall[x]++;wall[y]++;}sort(wall+1,wall+1+n);for(ll i=n;i>=2;i--)if(wall[i]<k){ll z=k-wall[i];wall[i]+=z;wall[i-1]+=z;ans+=z;}if(wall[1]!=k) ans+=k-wall[1];printf("%lld",ans);
}
T4 40分code
#include<cstdio>
#include<algorithm>
#define ll long long
using namespace std;
struct node{ll x,y;
}a[100];
ll n,v[100][4],ans;
void dfs(ll dep){if(dep>n){ans=(ans+1)%998244353;return;}if(!v[dep][0]){for(ll i=dep+1;i<=n;i++)if(a[i].x>a[dep].x&&a[i].y>a[dep].y) v[i][3]++;dfs(dep+1);for(ll i=dep+1;i<=n;i++)if(a[i].x>a[dep].x&&a[i].y>a[dep].y) v[i][3]--;}if(!v[dep][1]){for(ll i=dep+1;i<=n;i++)if(a[i].x>a[dep].x&&a[i].y<a[dep].y) v[i][3]++;dfs(dep+1);for(ll i=dep+1;i<=n;i++)if(a[i].x>a[dep].x&&a[i].y<a[dep].y) v[i][3]--;}if(!v[dep][2]){for(ll i=dep+1;i<=n;i++)if(a[i].x>a[dep].x&&a[i].y<a[dep].y) v[i][0]++;else if(a[i].x>a[dep].x) v[i][1]++;dfs(dep+1);for(ll i=dep+1;i<=n;i++)if(a[i].x>a[dep].x&&a[i].y<a[dep].y) v[i][0]--;else if(a[i].x>a[dep].x) v[i][1]--;}if(!v[dep][3])dfs(dep+1);
}
bool cmp(node x,node y){return x.x<y.x;
}
int main()
{scanf("%lld",&n);for(ll i=1;i<=n;i++)scanf("%lld%lld",&a[i].x,&a[i].y);sort(a+1,a+1+n,cmp);for(ll i=1;i<=n;i++){for(ll j=i+1;j<=n;j++){if(a[i].x==a[j].x&&a[i].y<a[j].y) v[i][0]=1,v[j][1]=1;if(a[i].x==a[j].x&&a[i].y>a[j].y) v[i][1]=1,v[j][0]=1;if(a[i].y==a[j].y&&a[i].x<a[j].x) v[i][2]=1,v[j][3]=1;if(a[i].y==a[j].y&&a[i].x>a[j].x) v[i][3]=1,v[j][2]=1;}}dfs(1);printf("%lld",ans);
}
总结
期望:(30+100+0+30=160)
实际:(100+50+0+40=190)还多了
T1不会就去刚T2,感觉还行结果没有判断另一种情况。之后去看T3,看题看了半天,不会。之后看T4,写了个30分暴力,结果拿了40。之后T1写了个三十分暴力,然后竟然过了(woc???)。
赛后发现T1暴力就是可以过,因为斐波那契数列到50就够了
尾声
今日说法