随笔分类 -  简单搜索

摘要:Problem Description You have a directed weighted graph with n vertexes and m edges. The value of a path is the sum of the weight of the edges you pass 阅读全文
posted @ 2019-08-23 21:39 进击的黑仔 阅读(269) 评论(0) 推荐(0)
摘要:恢复内容开始 Kurt reaches nirvana when he finds the product of all the digits of some positive integer. Greater value of the product makes the nirvana deepe 阅读全文
posted @ 2019-04-11 00:36 进击的黑仔 阅读(135) 评论(0) 推荐(0)
摘要:恢复内容开始 You are given a rooted tree with vertices numerated from 11 to nn . A tree is a connected graph without cycles. A rooted tree has a special ver 阅读全文
posted @ 2019-04-11 00:15 进击的黑仔 阅读(672) 评论(0) 推荐(0)
摘要:Description The left figure below shows a complete 3*3 grid made with 2*(3*4) (=24) matchsticks. The lengths of all matchsticks are one. You can find 阅读全文
posted @ 2019-03-31 21:33 进击的黑仔 阅读(454) 评论(0) 推荐(0)
摘要:Description The Leiden University Library has millions of books. When a student wants to borrow a certain book, he usually submits an online loan form 阅读全文
posted @ 2019-03-29 23:03 进击的黑仔 阅读(196) 评论(0) 推荐(0)
摘要:The 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, eac 阅读全文
posted @ 2019-03-28 19:22 进击的黑仔 阅读(225) 评论(0) 推荐(0)
摘要:"Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a stor 阅读全文
posted @ 2019-03-27 19:18 进击的黑仔 阅读(270) 评论(0) 推荐(0)
摘要:Last night, little erriyue had a horrible nightmare. He dreamed that he and his girl friend were trapped in a big maze separately. More terribly, ther 阅读全文
posted @ 2019-03-27 14:20 进击的黑仔 阅读(267) 评论(0) 推荐(0)
摘要:After going through the receipts from your car trip through Europe this summer, you realised that the gas prices varied between the cities you visited 阅读全文
posted @ 2019-03-26 20:27 进击的黑仔 阅读(170) 评论(0) 推荐(0)
摘要:描述 Ha'nyu是来自异世界的魔女,她在漫无目的地四处漂流的时候,遇到了善良的少女Rika,从而被收留在地球上。Rika的家里有一辆飞行车。有一天飞行车的电路板突然出现了故障,导致无法启动。 电路板的整体结构是一个R行C列的网格(R,C≤500),如右图所示。每个格点都是电线的接点,每个格子都包含 阅读全文
posted @ 2019-03-25 18:13 进击的黑仔 阅读(1094) 评论(0) 推荐(0)
摘要:Description A Sudoku grid is a 16x16 grid of cells grouped in sixteen 4x4 squares, where some cells are filled with letters from A to P (the first 16 阅读全文
posted @ 2019-03-25 09:37 进击的黑仔 阅读(401) 评论(0) 推荐(0)
摘要:Imagine you are standing inside a two-dimensional maze composed of square cells which may or may not be filled with rock. You can move north, south, e 阅读全文
posted @ 2019-03-25 08:56 进击的黑仔 阅读(340) 评论(0) 推荐(0)
摘要:描述 给定一个N行M列的01矩阵 A,A[i][j] 与 A[k][l] 之间的曼哈顿距离定义为: dist(A[i][j],A[k][l])=|i-k|+|j-l| 输出一个N行M列的整数矩阵B,其中: B[i][j]=min(1≤x≤N,1≤y≤M,A[x][y]=1)⁡{dist(A[i][j 阅读全文
posted @ 2019-03-24 19:52 进击的黑仔 阅读(427) 评论(0) 推荐(0)
摘要:Little Tom loves playing games. One day he downloads a little computer game called 'Bloxorz' which makes him excited. It's a game about rolling a box 阅读全文
posted @ 2019-03-24 18:59 进击的黑仔 阅读(185) 评论(0) 推荐(0)
摘要:描述 作为惩罚,GY被遣送去帮助某神牛给女生送礼物(GY:貌似是个好差事)但是在GY看到礼物之后,他就不这么认为了。某神牛有N个礼物,且异常沉重,但是GY的力气也异常的大(-_-b),他一次可以搬动重量和在w(w<=2^31-1)以下的任意多个物品。GY希望一次搬掉尽量重的一些物品,请你告诉他在他的 阅读全文
posted @ 2019-03-24 15:56 进击的黑仔 阅读(221) 评论(0) 推荐(0)
摘要:An addition chain for n is an integer sequence <a0, a1,a2,...,am=""> with the following four properties: a0 = 1 am = n a0 < a1 < a2 < ... < am-1 < am 阅读全文
posted @ 2019-03-24 13:39 进击的黑仔 阅读(145) 评论(0) 推荐(0)
摘要:7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。 设从下往上数第i(1 <= i <= M)层蛋糕是半径为Ri, 高度为Hi的圆柱。当i < M时,要求Ri > Ri+1且Hi > Hi+1。 由于要在蛋糕上抹奶油,为尽可能节约经费,我们希望蛋糕 阅读全文
posted @ 2019-03-22 22:32 进击的黑仔 阅读(733) 评论(0) 推荐(0)
摘要:Farmer John knows that an intellectually satisfied cow is a happy cow who will give more milk. He has arranged a brainy activity for cows in which the 阅读全文
posted @ 2018-04-29 23:53 进击的黑仔 阅读(196) 评论(0) 推荐(0)