上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 59 下一页
摘要: 题目大意: 每一条边都有两个权值,val和路径长度d,要保证在valvalj,di include include include include include define RG register define il inline define iter iterator define Max( 阅读全文
posted @ 2017-08-30 23:01 PIPIBoss 阅读(331) 评论(0) 推荐(1) 编辑
摘要: Today at the lesson Vitya learned a very interesting function — mex. Mex of a sequence of numbers is the minimum non negative number that is not prese 阅读全文
posted @ 2017-08-30 20:09 PIPIBoss 阅读(219) 评论(0) 推荐(1) 编辑
摘要: Description 松鼠的新家是一棵树,前几天刚刚装修了新家,新家有n个房间,并且有n 1根树枝连接,每个房间都可以相互到达,且俩个房间之间的路线都是唯一的。天哪,他居然真的住在“树”上。松鼠想邀请****前来参观,并且还指定一份参观指南,他希望**能够按照他的指南顺序,先去a1,再去a2,…… 阅读全文
posted @ 2017-08-30 18:04 PIPIBoss 阅读(178) 评论(0) 推荐(1) 编辑
摘要: Kirill plays a new computer game. He came to the potion store where he can buy any potion. Each potion is characterized by two integers — amount of ex 阅读全文
posted @ 2017-08-30 10:05 PIPIBoss 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Gleb ordered pizza home. When the courier delivered the pizza, he was very upset, because several pieces of sausage lay on the crust, and he does not 阅读全文
posted @ 2017-08-30 10:02 PIPIBoss 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Ilya is very fond of graphs, especially trees. During his last trip to the forest Ilya found a very interesting tree rooted at vertex 1. There is an i 阅读全文
posted @ 2017-08-30 09:29 PIPIBoss 阅读(203) 评论(0) 推荐(0) 编辑
摘要: You are given a tree (an acyclic undirected connected graph) with N nodes. The tree nodes are numbered from 1 to N. We define dist(a, b) as the number 阅读全文
posted @ 2017-08-29 22:09 PIPIBoss 阅读(191) 评论(0) 推荐(0) 编辑
摘要: Description Boatherds Inc. is a sailing company operating in the country of Trabantustan and offering boat trips on Trabantian rivers. All the rivers 阅读全文
posted @ 2017-08-29 00:23 PIPIBoss 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 题目描述 The cows are trying to become better athletes, so Bessie is running on a track for exactly N (1 ≤ N ≤ 10,000) minutes. During each minute, she ca 阅读全文
posted @ 2017-08-28 15:48 PIPIBoss 阅读(134) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Farmer John is arranging his NN cows in a line to take a photo (1 \leq N \leq 501≤N≤50). The height of the iith cow in sequence is a(i)a(i), and 阅读全文
posted @ 2017-08-27 20:38 PIPIBoss 阅读(322) 评论(0) 推荐(0) 编辑
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 59 下一页