欢乐纪中B组周五模拟赛【2019.3.8】
生活随笔
收集整理的這篇文章主要介紹了
欢乐纪中B组周五模拟赛【2019.3.8】
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
前言
成績
RankRankRank是有算別人的
| 222 | 2017myself2017myself2017myself | 210210210 | 100100100 | 100100100 | 101010 |
| 333 | 2017zyc2017zyc2017zyc | 200200200 | 100100100 | 100100100 | 000 |
| 333 | 2017xjq2017xjq2017xjq | 200200200 | 100100100 | 100100100 | 000 |
| 333 | 2017xxy2017xxy2017xxy | 200200200 | 100100100 | 100100100 | 000 |
| 101010 | 2017lw2017lw2017lw | 130130130 | 100100100 | 303030 | 000 |
| 141414 | 2017hjq2017hjq2017hjq | 606060 | 606060 | 000 | 000 |
| 171717 | 2017hzb2017hzb2017hzb | 303030 | 303030 | 000 | 000 |
| 181818 | 2017lrz2017lrz2017lrz | 202020 | 000 | 202020 | 000 |
正題
T1:jzoj3054?T1:jzoj3054-T1:jzoj3054?祖孫詢問【LCALCALCA】
鏈接:
https://blog.csdn.net/Mr_wuyongcong/article/details/88359248
T2:jzoj3055?T2:jzoj3055-T2:jzoj3055?比賽【數學,,,統計】
連接:
https://blog.csdn.net/Mr_wuyongcong/article/details/88359658
T3:jzoj3056?T3:jzoj3056-T3:jzoj3056?數字【數位dp,dp,dp,統計,,,容斥】
連接:
https://blog.csdn.net/Mr_wuyongcong/article/details/88361756
someofcodesome\ of\ codesome?of?code
T2 暴力
#include<cstdio> #define ll long long using namespace std; ll n,a[50010],b[50010],ans1,ans2; int main() {scanf("%lld",&n);for(ll i=1;i<=n;i++)scanf("%lld",&a[i]);for(ll i=1;i<=n;i++)scanf("%lld",&b[i]);for(ll i=1;i<=n;i++)for(ll j=1;j<=n;j++){ll w=(a[i]-b[j])*(a[i]-b[j]);if(a[i]>b[j]) ans1+=w;else ans2+=w;}printf("%.1lf",(double)(ans1-ans2)/n); }T3 暴力
#include<cstdio> #include<cstring> using namespace std; const int N=1010,XJQ=999983; int n,Z,ans,m,a[12],c[12]; char s[12]; void dfs(int x,int ys,int ds) {if(x==2*n){if(ys!=0&&ds!=0)return;//for(int i=0;i<2*n;i++)// printf("%d",c[i]);//putchar('\n');ans=(ans+1)%XJQ;return;}for(int i=1;i<=m;i++){c[x]=a[i];dfs(x+1,ys+a[i]*((x%2)?1:-1),ds+a[i]*((x>=n)?1:-1));} } int main() {scanf("%d",&n);scanf("%s",s+1);//double star=clock();m=strlen(s+1);for(int i=1;i<=m;i++)a[i]=s[i]-'0';dfs(0,0,0);printf("%d",ans); }總結
看題預估分100+30+20=150100+30+20=150100+30+20=150
做題預估分100+100+20=220100+100+20=220100+100+20=220
實際分數100+100+10=210100+100+10=210100+100+10=210
T1T1T1明顯LCALCALCA,直接切掉
T2T2T2開始不會,后來發現了全排列的性質,然后推一下公式就切掉了
之后死剛T3T3T3,然后公式全靠猜,結果10分
尾聲
沒有尾聲
總結
以上是生活随笔為你收集整理的欢乐纪中B组周五模拟赛【2019.3.8】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: jzoj3056-数字【数位dp,统计,
- 下一篇: jzoj4742-单峰【数学,数论】