YunYan

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2019年7月26日

摘要: 呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好是使A物体变成B物体. Harry已经将他所会的所有咒语都列成了一个表,他想 阅读全文
posted @ 2019-07-26 16:58 Target--fly 阅读(214) 评论(0) 推荐(0) 编辑

2019年7月25日

摘要: You task is to find minimal natural number N, so that N! contains exactly Q zeroes on the trail in decimal notation. As you know N! = 1*2*...*N. For e 阅读全文
posted @ 2019-07-25 23:32 Target--fly 阅读(122) 评论(0) 推荐(0) 编辑

摘要: 一所学校不久前买了第一台电脑(所以这台电脑的ID是1)。近年来,学校购买了N-1新电脑。每台新电脑都连接到一台先前安装的电脑上。学校的管理人员担心网络运行缓慢,希望知道第i台计算机需要发送信号的最大距离si(即到最远计算机的电缆长度)。您需要提供此信息。 提示:示例输入与此图对应。从图中,你可以看到 阅读全文
posted @ 2019-07-25 21:22 Target--fly 阅读(203) 评论(0) 推荐(0) 编辑

摘要: My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F 阅读全文
posted @ 2019-07-25 18:51 Target--fly 阅读(152) 评论(0) 推荐(0) 编辑

摘要: 1.binary_search(arr[],arr[]+size,index) #include<algorithm> 功能 在数组中查找某个元素是否存在 函数模板:binary_search(地址1,地址2,v) 返回值:若是查到了v返回1,查找不到则返回0; 时间复杂度:log2(N)+2 2. 阅读全文
posted @ 2019-07-25 17:17 Target--fly 阅读(689) 评论(0) 推荐(0) 编辑

摘要: Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three numbers Ai, Bj, Ck, whic 阅读全文
posted @ 2019-07-25 16:46 Target--fly 阅读(200) 评论(0) 推荐(0) 编辑

摘要: 思路:两次二分查找。。第一次寻找该数字第一次出现的位置,第二次查找该数字最后一次出现的位置 做差并加1; 阅读全文
posted @ 2019-07-25 15:17 Target--fly 阅读(1644) 评论(0) 推荐(0) 编辑

摘要: Given a tree (a connected graph with no cycles), you have to find the farthest nodes in the tree. The edges of the tree are weighted and undirected. T 阅读全文
posted @ 2019-07-25 13:22 Target--fly 阅读(158) 评论(0) 推荐(0) 编辑

摘要: Building and maintaining roads among communities in the far North is an expensive business. With this in mind, the roads are build such that there is 阅读全文
posted @ 2019-07-25 13:19 Target--fly 阅读(257) 评论(0) 推荐(0) 编辑

摘要: After hearing about the epidemic of obesity in the USA, Farmer John wants his cows to get more exercise, so he has committed to create a bovine marath 阅读全文
posted @ 2019-07-25 13:15 Target--fly 阅读(115) 评论(0) 推荐(0) 编辑