摘要: 题目传送门 1 /* 2 比C还水。。。 3 */ 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 11 typedef long long ll;12 13 const... 阅读全文
posted @ 2015-05-21 21:49 Running_Time 阅读(119) 评论(0) 推荐(0)
摘要: 题目传送门 1 /* 2 题意:每棵树给出坐标和高度,可以往左右倒,也可以不倒 3 问最多能砍到多少棵树 4 DP:dp[i][0/1/2] 表示到了第i棵树时,它倒左或右或不动能倒多少棵树 5 分情况讨论,若符合就取最大值更新,线性dp,自己做出来了:) 6 */ ... 阅读全文
posted @ 2015-05-21 21:47 Running_Time 阅读(200) 评论(0) 推荐(0)
摘要: 题目传送门 1 /* 2 题意:找到一个字符串p,使得它和s,t的不同的总个数相同 3 贪心:假设p与s相同,奇偶变换赋值,当是偶数,则有答案 4 */ 5 #include 6 #include 7 #include 8 #include 9 #include 10 usi... 阅读全文
posted @ 2015-05-21 21:37 Running_Time 阅读(133) 评论(0) 推荐(0)
摘要: 题目传送门 1 /* 2 题意:5种情况对应对应第i或j辆车翻了没 3 水题:其实就看对角线的上半边就可以了,vis判断,可惜WA了一次 4 3: if both cars turned over during the collision. 5 是指i,j两辆车,而不... 阅读全文
posted @ 2015-05-21 21:31 Running_Time 阅读(190) 评论(0) 推荐(0)