YunYan

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

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 阅读(130) 评论(0) 推荐(0)

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

摘要: 思路:两次二分查找。。第一次寻找该数字第一次出现的位置,第二次查找该数字最后一次出现的位置 做差并加1; 阅读全文
posted @ 2019-07-25 15:17 Target--fly 阅读(1708) 评论(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 阅读(170) 评论(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 阅读(262) 评论(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 阅读(130) 评论(0) 推荐(0)

摘要: The northern part of the Pyramid contains a very large and complicated labyrinth. The labyrinth is divided into square blocks, each of them either fil 阅读全文
posted @ 2019-07-25 13:04 Target--fly 阅读(145) 评论(0) 推荐(0)

摘要: Now give you an string which only contains 0, 1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9.You are asked to add the sign ‘+’ or ’-’ between the characters. Just like giv 阅读全文
posted @ 2019-07-25 09:07 Target--fly 阅读(163) 评论(0) 推荐(0)

摘要: 小明做了一个很久很久的梦,醒来后他竟发现自己和朋友在一个摇摇欲坠的大棋盘上,他们必须得想尽一切办法逃离这里。经过长时间的打探,小明发现,自己所在的棋盘格子上有个机关,上面写着“你只有一次机会,出发后t秒大门会为你敞开”,而他自己所在的棋盘是大小为 N*M 的长方形,他可以向上下左右四个方向移动(不可 阅读全文
posted @ 2019-07-25 08:37 Target--fly 阅读(166) 评论(0) 推荐(0)

摘要: Fox Ciel is playing a mobile puzzle game called "Two Dots". The basic levels are played on a board of size n × m cells, like this: Each cell contains 阅读全文
posted @ 2019-07-25 08:15 Target--fly 阅读(189) 评论(0) 推荐(0)