2016年3月31日

codeforces 659F . Polycarp and Hay 搜索

摘要: 题目链接 遍历每个点, 如果这个点的值能被k整除并且k/a[i][j]后小于等于n m, 那么就对这个点进行搜索。 将这个点加入队列, 将周围的所有大于等于这个点的值的点也加入队列。 不断重复, 直到队列空或者数量满足要求。 可以加一个额外的数组, 如果搜索的过程中, 这个值和a[i][j]相同, 阅读全文

posted @ 2016-03-31 14:07 yohaha 阅读(194) 评论(0) 推荐(0) 编辑

codeforces 659C . Tanya and Toys 二分

摘要: 题目链接 将给出的已经有了的排序, 在前面加上0, 后面加上1e9+1。 然后对相邻的两项判断。 如果相邻两项之间的数的和小于m, 那么全都选上, m减去相应的值。 如果大于m, 那么二分判断最多能选多少个。 include include include include include inclu 阅读全文

posted @ 2016-03-31 11:14 yohaha 阅读(190) 评论(0) 推荐(0) 编辑

codeforces 659D . Bicycle Race 几何

摘要: 题目链接 对相邻的三个点叉积判断一下就好。 include include include include include include include include include include include include include using namespace std; def 阅读全文

posted @ 2016-03-31 11:11 yohaha 阅读(194) 评论(0) 推荐(0) 编辑

codeforces 659E . New Reform 强连通

摘要: 题目链接 对于每一个联通块, 如果有一个强连通分量, 那么这个联通块对答案的贡献就是0。 否则对答案贡献是1. include include include include include include include include include include include includ 阅读全文

posted @ 2016-03-31 11:09 yohaha 阅读(120) 评论(0) 推荐(0) 编辑

导航