随笔分类 -  OJ-hihoCoder

摘要:"hihocoder" 对于一个节点i来说,如果我们能够先计算出它所有前驱节点的病毒数量,就可以直接推算出它最后的病毒数量了,但是怎么来计算所有前驱节点呢? 这就要从图的性质入手了。我们现在的网络是没有环的,对于任意一个节点i,当它将自己所有的病毒都传送出去之后,它自身的病毒数量就不会改变了。那么我 阅读全文
posted @ 2018-06-13 00:02 Roni_i 阅读(185) 评论(0) 推荐(0) 编辑
摘要:"hihocoder 1174" [算法]: 1. 计算每一个点的入度值deg[i],这一步需要扫描所有点和边,复杂度O(N+M)。 2. 把入度为0的点加入队列Q中,当然有可能存在多个入度为0的点,同时它们之间也不会存在连接关系,所以按照任意顺序加入Q都是可以的。 3. 从Q中取出一个点p。对于每 阅读全文
posted @ 2018-06-11 16:16 Roni_i 阅读(223) 评论(0) 推荐(0) 编辑
摘要:Arithmetic Expression 时间限制:2000ms 单点时限:200ms 内存限制:256MB Arithmetic Expression 时间限制:2000ms 单点时限:200ms 内存限制:256MB 描述 Given N arithmetic expressions, can 阅读全文
posted @ 2017-11-28 17:51 Roni_i 阅读(101) 评论(0) 推荐(0) 编辑
摘要:#1579 : Reverse Suffix Array #1579 : Reverse Suffix Array 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There is a strong data structure called "Suffix Array" 阅读全文
posted @ 2017-09-24 10:35 Roni_i 阅读(346) 评论(0) 推荐(0) 编辑
摘要:题目1 : Visiting Peking University 题目1 : Visiting Peking University 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 Ming is going to travel for n days and the dat 阅读全文
posted @ 2017-09-24 10:14 Roni_i 阅读(213) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> #include <cmath> #include <cstdio> #include <cctype> #include <cstdlib> #include <cstring> #include <climits> #include <set> #incl 阅读全文
posted @ 2017-09-23 17:33 Roni_i 阅读(1241) 评论(2) 推荐(0) 编辑

点击右上角即可分享
微信分享提示