摘要: change information in person: 1.多项式中自变量为x ,从左到右按照次数递减顺序给出多项式。 2.多项式中只包含系数不为 0 的项。 3.如果多项式 n 次项系数为正,则多项式开头不出现“ + ”号,如果 多项式 n 次项系 数为负,则多项式以“ - ”号开头。 4. 1)对于不是最高次的项,以“ + ”号或者“ - ”号连接此项与前一 项,分别表... 阅读全文
posted @ 2018-07-13 20:01 TimDucan 阅读(310) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; inline int read(){ int num=0,f=1; char c=getchar(); while(!isdigit(c)){if(c=='-') f=-1; c=getchar();} while(isdigit(... 阅读全文
posted @ 2017-11-09 11:51 TimDucan 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 区间和 #include #include #include #include using namespace std; inline int read(){ int num=0,f=1; char c=getchar(); while(!isdigit(c)){if(c=='-') f=-1; c=getchar();} while(isdigit(c))... 阅读全文
posted @ 2017-11-07 07:09 TimDucan 阅读(149) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; inline int read(){ int num=0,f=1; char c=getchar(); while(!isdigit(c)){if(c=='-') f=-1; c=getchar();} while(isdigit... 阅读全文
posted @ 2017-11-06 07:47 TimDucan 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 学习链接http://www.cnblogs.com/JVxie/p/4854719.html #include #include #include #include #include using namespace std; #define maxn 100010 typedef long long ll; vectors[maxn],q[maxn]; vectorw[ma... 阅读全文
posted @ 2017-11-05 14:55 TimDucan 阅读(153) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; const int maxn=20001; int n,m,q,fa[maxn]; int find(int x){ if(fa[x]!=x) fa[x]=find(fa[x]); return fa[x]; } inline void un(int a,in... 阅读全文
posted @ 2017-11-05 08:07 TimDucan 阅读(112) 评论(0) 推荐(0) 编辑
摘要: for(int i=1;i<=n;i++) for(int j=1;j<=m;j++){ for(int l=1;l<=i;l++){ for(int r=1;r<=j;r++){ sum[i][j]+=a[l][r]; } ... 阅读全文
posted @ 2017-11-05 07:46 TimDucan 阅读(181) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; #define maxn 100 char c[maxn]; long long a[maxn],f[maxn][maxn],sum[maxn][maxn]; int main(){ int n,k; scanf("%d%d",&n,&k... 阅读全文
posted @ 2017-11-02 21:21 TimDucan 阅读(244) 评论(1) 推荐(0) 编辑
摘要: //自己独创的完全背包,实际是01背包从前往后推的情况 (与3对照更好理解) #include #include #include using namespace std; #define maxn 100010 int c[maxn],v[maxn],f[maxn]; int main(){ ios::sync_with_stdio(false); int n,m,ma... 阅读全文
posted @ 2017-11-02 10:15 TimDucan 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 1 题目描述 2 3 Yumis最近在玩炉石传说。 4 5 在炉石传说中脏牧有一张一费卡片(一费就是使用要消耗1点法力水晶),叫做疯狂药水,这个的效果是将一个敌方场上攻击小于等于2的随从拉到自己的战场内。 6 7 还有一张四费卡片叫做暗影狂乱,这个的效果是将一个敌方场上攻击小于等于3的随从拉到自己的战场内。 8 9 还有一张一费卡片就是缩小药水,这个的... 阅读全文
posted @ 2017-10-30 09:54 TimDucan 阅读(320) 评论(0) 推荐(0) 编辑