前言
高三dalao试图混入其中
成绩
RankRankRank | PersonPersonPerson | ScoreScoreScore | AAA | BBB | CCC |
---|---|---|---|---|---|
111 | 2017myself2017myself2017myself | 205205205 | 252525 | 808080 | 100100100 |
222 | 2013lyy2013lyy2013lyy | 200200200 | 100100100 | 707070 | 303030 |
333 | 2015hjw2015hjw2015hjw | 120120120 | 303030 | 909090 | 000 |
444 | 2017zyc2017zyc2017zyc | 110110110 | 303030 | 303030 | 505050 |
444 | 2013lyk2013lyk2013lyk | 110110110 | 100100100 | 101010 | 000 |
666 | 2015trx2015trx2015trx | 105105105 | 555 | 100100100 | 000 |
777 | 2017xxy2017xxy2017xxy | 100100100 | 100100100 | 000 | 000 |
777 | 2017xjq2017xjq2017xjq | 100100100 | 000 | 100100100 | 000 |
999 | 2015gjh2015gjh2015gjh | 707070 | 000 | 707070 | 000 |
101010 | 2013yhl2013yhl2013yhl | 505050 | 000 | 000 | 505050 |
正题
T1:nssl1231−GiftT1:nssl1231-GiftT1:nssl1231−Gift【010101背包,dp,dp,dp】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/83445478
T2:nssl1232−T2:nssl1232-T2:nssl1232−函数【数论,欧拉函数,,,莫比乌斯反演】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/83445596
T3:nssl1230−T3:nssl1230-T3:nssl1230−序列【位运算】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/83445650
someofcodesome\ of\ codesome of code
T1 25分code
#include<cstdio>
#include<algorithm>
using namespace std;
int n,m,c[100],s;
int main()
{scanf("%d%d",&n,&m);for(int i=1;i<=n;i++)scanf("%d",&c[i]);for(int i=0;i<(1<<n);i++){int mo=0,mins=2147483647;for(int j=0;j<n;j++){mo+=(i>>j)%2*c[j+1];if(!((i>>j)%2))mins=min(mins,c[j+1]);}if(mo<=m&&mo+mins>m) s++;}printf("%d",s);
}
尾声
用更高深的算法水了个80分?