摘要: 思路: 求所有树的最大高度? 注意:所有树从树根开始? #include using namespace std;typedef long long LL;struct asd{ int to; int next;}e[2500];int head[2500],tol;int pre[2500... 阅读全文
posted @ 2017-03-20 22:38 see_you_later 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 思路: 暴力。。我不会呀。。 YY一个二分匹配嘛,然后数组开小了。GG for an hour. #include using namespace std;typedef long long LL;int cy[110];int cx[110];int n,m;char ma[15][15];i... 阅读全文
posted @ 2017-03-20 22:29 see_you_later 阅读(219) 评论(0) 推荐(0) 编辑
摘要: 思路: 枚举0-9之间的数,然后判断。 然后一鼓作气打成了大模拟。。。。我日啊。。。 心疼自己。 #include using namespace std;typedef long long LL;const int N=1e4+10;int n,k;char s[N],ss[N];int nu... 阅读全文
posted @ 2017-03-20 22:27 see_you_later 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 问题一(未完): 考虑n行m列的棋盘,其某些方格禁止落子。能够被放到棋盘上的非攻击型车的最多个数。 考虑4行5列的棋盘,其落子位置如下表: y1 y2 y3 y4 y5 x1 * x2 * * x3 * * * x4 * ... 阅读全文
posted @ 2017-03-20 00:56 see_you_later 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 思路: 7越多越好,然后从7最多个数枚举过去,判断一下剩下的能不能用4解决就好了; #include using namespace std;typedef long long LL;int main(){ int m,n; scanf("%d",&n); int q=n/7;... 阅读全文
posted @ 2017-03-20 00:09 see_you_later 阅读(251) 评论(0) 推荐(0) 编辑
摘要: 思路: 原来string类能sort 和 swap....太强了.... 注意:字典序最小输出,因为某个地方写挫了,sort了n发,代码挫。 #include using namespace std;typedef long long LL;int tol;mapid;mapxs;string ... 阅读全文
posted @ 2017-03-20 00:07 see_you_later 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 题意: n g dough m种商品? 每种有ai stuffing, 拿bi stuffing + ci dough -> di tugriks rest c0 dough -> d0 tugriks 求最大的tugriks 思路: dough是爸爸, dp[i] 代表 在花费 i 情况下 ... 阅读全文
posted @ 2017-03-20 00:03 see_you_later 阅读(194) 评论(0) 推荐(0) 编辑