前言
呆学校呆3天依旧不想复习期中,感觉要凉。
成绩
RankRankRank | PersonPersonPerson | ScoreScoreScore | AAA | BBB | CCC |
---|---|---|---|---|---|
111 | 2017myself2017myself2017myself | 180180180 | 100100100 | 808080 | 000 |
222 | 2014yqf2014yqf2014yqf | 140140140 | 000 | 404040 | 100100100 |
444 | 2017lw2017lw2017lw | 808080 | 000 | 808080 | 000 |
444 | 2017hzb2017hzb2017hzb | 808080 | 000 | 808080 | 000 |
444 | 2014lxf2014lxf2014lxf | 808080 | 000 | 808080 | 000 |
444 | 2017lrz2017lrz2017lrz | 808080 | 000 | 808080 | 000 |
777 | 2014lyj2014lyj2014lyj | 707070 | 404040 | 303030 | 000 |
888 | 2014lx2014lx2014lx | 606060 | 000 | 606060 | 000 |
999 | 2017zyc2017zyc2017zyc | 404040 | 000 | 000 | 404040 |
999 | 2015gjh2015gjh2015gjh | 404040 | 000 | 000 | 404040 |
999 | 2017hjq2017hjq2017hjq | 404040 | 000 | 000 | 404040 |
正题
T1:nssl1257−AT1:nssl1257-AT1:nssl1257−A【数论】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/83613856
T2:nssl1258−naiveT2:nssl1258-naiveT2:nssl1258−naive的瓶子【贪心】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/83614270
T3:nssl1259−sequenceT3:nssl1259-sequenceT3:nssl1259−sequence【组合数,,,差分】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/83614562
someofcodesome\ of\ codesome of code
T2 80分code
#include<cstdio>
#include<algorithm>
#define ll long long
using namespace std;
ll t,n,a[310],ans,s;
int main()
{scanf("%lld",&t);for(ll i=1;i<=t;i++){scanf("%lld",&n);ans=1e18;for(ll i=1;i<=n;i++)scanf("%lld",&a[i]);for(ll i=1;i<=n;i++){s=0;for(ll j=1;j<=n;j++)if(a[j]!=a[i])s+=a[j]*a[i];ans=min(ans,s);}printf("%lld\n",ans);}
}
尾声
题目依旧ABC。