题面 枚举每个数字是否能被删去,然后就是如何判定图是否存在。应该从按“度数”从大到小排序,从最大的顺次向其他点连边(先连“度数”小的可能会把一些可以和大“度数”点连接的点用掉)。但是这个排序每连一次都要做一次,而$N<=500$的情况下$O(n^3log$ $n)$并不能过。但是发现度数最多只有$n ...
分类:
其他好文 时间:
2018-09-20 11:05:12
阅读次数:
139
题目传送门 Cyclic Nacklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15508 Accepted Submission(s ...
分类:
其他好文 时间:
2018-09-14 23:55:37
阅读次数:
205
2018 ICPC 沈阳网络赛 Call of Accepted 题目描述 :求一个算式的最大值与最小值。 solution 按普通算式计算方法做,只不过要同时记住最大值和最小值而已。 Convex Hull 题目描述 :定义函数$gay(x)$,若$x$是某个非$1$的数的平方的倍数,则$gay( ...
分类:
其他好文 时间:
2018-09-12 20:08:13
阅读次数:
263
根据用户的备注名来给用户发送特定的消息,在itchat获取的friends列表中,username每次登陆之后都会出现变化。 ...
分类:
微信 时间:
2018-09-12 14:31:36
阅读次数:
279
Hello everyone, I'm very happy to introduce myself here.I'm stone. I was born in Hubei Province. My friends say that I'm an easygoing and helpful pers ...
分类:
其他好文 时间:
2018-09-09 15:31:31
阅读次数:
167
Hello,everyone! My name is Xianhong Zhou.I'am a 19-years-old boy.I have a lot of hobbies.I like to exercise with my friends. If you only have one, you ...
分类:
其他好文 时间:
2018-09-08 13:05:33
阅读次数:
170
假设有一段文本:"I have a cat, his name is Huzihu. Huzihu is really cute and friendly. We are good friends." 那么怎么提取这段文本的特征呢? 一个简单的方法就是使用词袋模型(bag of words mode ...
分类:
系统相关 时间:
2018-09-06 02:59:03
阅读次数:
711
Oleg the client and Igor the analyst are good friends. However, sometimes they argue over little things. Recently, they started a new company, but the ...
分类:
其他好文 时间:
2018-08-28 20:14:53
阅读次数:
212
嘟嘟嘟 首先想想暴力的做法,枚举加入的字符,然后判断删去这个字符后两个长度为n / 2的字符串是否相等,复杂度O(n2)。 所以可以想办法把判断复杂度降低到O(1),那自然就想到hash了。hash是能做到O(n)预处理,然后O(1)比较的。 取一段的hash值:hash[L, R] = hash[ ...
分类:
其他好文 时间:
2018-08-28 16:18:04
阅读次数:
149
###########列表操作################# 定义列表:my_girl_friends=['alex','wupeiqi','yuanhao',4,5] #本质my_girl_friends=list([...])# 或 l=list('abc') #索引取值# l=[1,2,3 ...
分类:
其他好文 时间:
2018-08-25 16:24:46
阅读次数:
141