前言
高三dalao试图混入其中
成绩
R a n k Rank Rank | P e r s o n Person Person | S c o r e Score Score | A A A | B B B | C C C |
---|---|---|---|---|---|
1 1 1 | 2017 m y s e l f 2017myself 2017myself | 205 205 205 | 25 25 25 | 80 80 80 | 100 100 100 |
2 2 2 | 2013 l y y 2013lyy 2013lyy | 200 200 200 | 100 100 100 | 70 70 70 | 30 30 30 |
3 3 3 | 2015 h j w 2015hjw 2015hjw | 120 120 120 | 30 30 30 | 90 90 90 | 0 0 0 |
4 4 4 | 2017 z y c 2017zyc 2017zyc | 110 110 110 | 30 30 30 | 30 30 30 | 50 50 50 |
4 4 4 | 2013 l y k 2013lyk 2013lyk | 110 110 110 | 100 100 100 | 10 10 10 | 0 0 0 |
6 6 6 | 2015 t r x 2015trx 2015trx | 105 105 105 | 5 5 5 | 100 100 100 | 0 0 0 |
7 7 7 | 2017 x x y 2017xxy 2017xxy | 100 100 100 | 100 100 100 | 0 0 0 | 0 0 0 |
7 7 7 | 2017 x j q 2017xjq 2017xjq | 100 100 100 | 0 0 0 | 100 100 100 | 0 0 0 |
9 9 9 | 2015 g j h 2015gjh 2015gjh | 70 70 70 | 0 0 0 | 70 70 70 | 0 0 0 |
10 10 10 | 2013 y h l 2013yhl 2013yhl | 50 50 50 | 0 0 0 | 0 0 0 | 50 50 50 |
正题
T 1 : n s s l 1231 − G i f t T1:nssl1231-Gift T1:nssl1231−Gift【 01 01 01背包 , d p ,dp ,dp】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/83445478
T 2 : n s s l 1232 − T2:nssl1232- T2:nssl1232−函数【数论,欧拉函数 , , ,莫比乌斯反演】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/83445596
T 3 : n s s l 1230 − T3:nssl1230- T3:nssl1230−序列【位运算】
博客链接:
https://blog.csdn.net/Mr_wuyongcong/article/details/83445650
s o m e o f c o d e some\ of\ code some 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分?