欢乐纪中某B组赛【2019.1.24】
生活随笔
收集整理的這篇文章主要介紹了
欢乐纪中某B组赛【2019.1.24】
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
前言
劃水AKAKAK
成績
RankRankRank是有算別人的
| 111 | 2017myself2017myself2017myself | 300300300 | 100100100 | 100100100 | 100100100 |
| 111 | 2017xjq2017xjq2017xjq | 300300300 | 100100100 | 100100100 | 100100100 |
| 999 | 2017zyc2017zyc2017zyc | 260260260 | 100100100 | 606060 | 100100100 |
| 121212 | 2017xxy2017xxy2017xxy | 250250250 | 100100100 | 100100100 | 505050 |
| 343434 | 2017lrz2017lrz2017lrz | 180180180 | 303030 | 100100100 | 505050 |
| 525252 | 2017lw2017lw2017lw | 130130130 | 303030 | 100100100 | 000 |
| 727272 | 2017hzb2017hzb2017hzb | 110110110 | 303030 | 606060 | 202020 |
| 949494 | 2017hjq2017hjq2017hjq | 606060 | 303030 | 303030 | 000 |
正題
T1之前做過就直接放連接了
博客鏈接:
https://blog.csdn.net/Mr_wuyongcong/article/details/82501562
T2:jzoj3913?T2:jzoj3913-T2:jzoj3913?艱難的選擇【差分,統計】
博客鏈接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86624013
T3:jzoj3914?T3:jzoj3914-T3:jzoj3914?人品問題【樹形dpdpdp】
博客鏈接:
https://blog.csdn.net/Mr_wuyongcong/article/details/86624067
someofcodesome\ of\ codesome?of?code
T1暴力
#include<cstdio> #define ll long long using namespace std; ll x,y,ans; int main() {freopen("data.in","r",stdin);freopen("data.ans","w",stdout);scanf("%lld%lld",&x,&y);for(ll i=1;i<=y;i++)ans+=x%i;printf("%lld",ans); }T1隨機數據
#include<cstdio> #include<cstdlib> #include<ctime> #define random(x) rand()*rand()%x+1 using namespace std; int main() {freopen("data.in","w",stdout);srand(time(0));printf("%d %d",random(1000000),random(1000000)); }T2暴力
#include<cstdio> #include<algorithm> using namespace std; int n,x[1010],sum[1010],ans; int main() {freopen("data.in","r",stdin);freopen("data.ans","w",stdout);scanf("%d",&n);for(int i=1;i<=n;i++){scanf("%d",&x[i]);sum[i]=sum[i-1]+x[i]*2-1;}for(int i=1;i<=n;i++){for(int j=i;j<=n;j++){if(!(sum[j]-sum[i-1]))ans=max(ans,j-i+1);}}printf("%d",ans); }T2隨機數據
#include<cstdio> #include<cstdlib> #include<ctime> #define random(x) rand()*rand()%x+1 using namespace std; int main() {freopen("data.in","w",stdout);srand(time(0));printf("100000\n");for(int i=1;i<=100000;i++)printf("%d ",rand()%2); }尾聲
XJQXJQXJQ竟然用O(n2)O(n^2)O(n2)切掉了T2T2T2。
總結
以上是生活随笔為你收集整理的欢乐纪中某B组赛【2019.1.24】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: jzoj3914-人品问题【树形dp】
- 下一篇: 微软 Xbox 第一方游戏发布路线图:动