ssl提高组周六备考赛【2018.10.27】
生活随笔
收集整理的這篇文章主要介紹了
ssl提高组周六备考赛【2018.10.27】
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
前言
高三dalao試圖混入其中
成績
| 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分?
總結
以上是生活随笔為你收集整理的ssl提高组周六备考赛【2018.10.27】的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2016年5000元电脑配置(5000年
- 下一篇: nssl1247-A【dp】