Live2d Test Env
上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 101 下一页
摘要: 题意:求有向图里面有多少个三元环。 思路:枚举起点A,遍历A可以到的B,然后求C的数量,C的数量位B可以到是地方X集合,和可以到A的地方Y集合的交集(X&Y)。 B点可以枚举,也可以遍历。(两种都试过,区别不大。) 枚举代码: 遍历代码: 阅读全文
posted @ 2018-03-10 10:41 nimphy 阅读(373) 评论(0) 推荐(0) 编辑
摘要: You are given N sets, the i-th set (represent by S(i)) have C(i) element (Here "set" isn't entirely the same as the "set" defined in mathematics, and 阅读全文
posted @ 2018-03-10 09:33 nimphy 阅读(648) 评论(0) 推荐(0) 编辑
摘要: In a certain course, you take n tests. If you get ai out of bi questions correct on test i, your cumulative average is defined to be . Given your test 阅读全文
posted @ 2018-03-07 23:06 nimphy 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 时间限制:4000ms 单点时限:4000ms 内存限制:256MB 时间限制:4000ms 单点时限:4000ms 内存限制:256MB 描述 你知道KMP吗?它是用于判断一个字符串是否是另一个字符串的子串的算法。今天我们想去扩展它。 在信息理论中,在两个相同长度的字符串之间的海明码距离是:两个字 阅读全文
posted @ 2018-03-07 19:22 nimphy 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 先放代码。 下标从1开始。 #include<cstdio> #include<iostream> #include<cstring> using namespace std; const int N = 101010; int next[N],extand[N]; char S[N],T[N]; 阅读全文
posted @ 2018-03-07 16:37 nimphy 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 一题题目: 一题题解: 这个题目哪来入门再好不过了,支老板之前没有接触过这个东西,然后一点即通:就是把一个int(32位)拆成32个只放0或1的位置,然后这32个的单点操作或者32个一起操作的复杂度是O(1),所以长度位N的bitset的一次单点操作是O(1),整体操作是O(N/w),其中w=32。 阅读全文
posted @ 2018-03-06 23:06 nimphy 阅读(548) 评论(0) 推荐(0) 编辑
摘要: Z国的骑士团是一个很有势力的组织,帮会中汇聚了来自各地的精英。他们劫富济贫,惩恶扬善,受到社会各界的赞扬。最近发生了一件可怕的事情,邪恶的Y国发动了一场针对Z国的侵略战争。战火绵延五百里,在和平环境中安逸了数百年的Z国又怎能抵挡的住Y国的军队。于是人们把所有的希望都寄托在了骑士团的身上,就像期待有一 阅读全文
posted @ 2018-03-05 22:24 nimphy 阅读(208) 评论(0) 推荐(0) 编辑
摘要: Chinese people think of '8' as the lucky digit. Bob also likes digit '8'. Moreover, Bob has his own lucky number L. Now he wants to construct his luck 阅读全文
posted @ 2018-03-04 16:02 nimphy 阅读(308) 评论(0) 推荐(0) 编辑
摘要: A friend of yours has taken the job of security officer at the Star-Buy Company, a famous depart- ment store. One of his tasks is to install a video s 阅读全文
posted @ 2018-03-04 12:59 nimphy 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Being the only living descendant of his grandfather, Kamran the Believer inherited all of the grandpa's belongings. The most valuable one was a piece 阅读全文
posted @ 2018-03-04 11:34 nimphy 阅读(288) 评论(0) 推荐(0) 编辑
上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 101 下一页