前言
划水AKAKAK
成绩
RankRankRank是有算别人的
RankRankRank | PersonPersonPerson | ScoreScoreScore | AAA | BBB | CCC |
---|---|---|---|---|---|
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。