摘要: While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path tha 阅读全文
posted @ 2020-04-13 22:14 DeaL57 阅读(111) 评论(0) 推荐(0)
摘要: Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchang 阅读全文
posted @ 2020-04-13 17:07 DeaL57 阅读(255) 评论(0) 推荐(0)
摘要: One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total 阅读全文
posted @ 2020-04-13 10:46 DeaL57 阅读(138) 评论(0) 推荐(0)
摘要: You have array of nn numbers a1,a2,…,ana1,a2,…,an. Rearrange these numbers to satisfy |a1−a2|≤|a2−a3|≤…≤|an−1−an||a1−a2|≤|a2−a3|≤…≤|an−1−an|, where |x 阅读全文
posted @ 2020-04-13 08:20 DeaL57 阅读(262) 评论(0) 推荐(0)