摘要: 6576: guruguru 题目描述 Snuke is buying a lamp. The light of the lamp can be adjusted to m levels of brightness, represented by integers from 1 through m, 阅读全文
posted @ 2018-07-20 21:59 lglh 阅读(250) 评论(0) 推荐(0) 编辑
摘要: You are given an integer sequence of length N, a= {a1,a2,…,aN}, and an integer K.a has N(N+1)⁄2 non-empty contiguous subsequences, {al,al+1,…,ar} (1≤l 阅读全文
posted @ 2018-06-17 22:16 lglh 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 6552: Ball Coloring 题目描述 There are N bags, each containing two white balls. The i-th box contains two balls with integers xi and yi written on them, r 阅读全文
posted @ 2018-06-13 18:20 lglh 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 6498: Xor Sum 题目描述 You are given a positive integer N. Find the number of the pairs of integers u and v (0≤u,v≤N) such that there exist two non-negati 阅读全文
posted @ 2018-06-04 15:41 lglh 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 6492: Connectivity 题目描述 There are N cities. There are also K roads and L railways, extending between the cities. The i-th road bidirectionally connect 阅读全文
posted @ 2018-05-29 22:37 lglh 阅读(409) 评论(0) 推荐(0) 编辑
摘要: 6990: Sequence II 题目描述 We define an element ai in a sequence "good", if and only if there exists a j(1≤ j < i) such that aj < ai.Given a permutation p 阅读全文
posted @ 2018-05-23 20:18 lglh 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 4981: Collatz Conjecture 题目描述 In 1978 AD the great Sir Isaac Newton, whilst proving that P is a strict superset of N P, defined the Beta Alpha Pi Zeta 阅读全文
posted @ 2018-05-21 17:09 lglh 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 4990: Lemonade Trade 题目描述 The lunch break just started! Your mother gave you one litre of pink lemonade. You do not like pink lemonade and want blue l 阅读全文
posted @ 2018-05-21 17:04 lglh 阅读(205) 评论(0) 推荐(0) 编辑
摘要: Alice and Bob are playing a stone game. There are n piles of stones. In each turn, a player can remove some stones from a pile (the number must be pos 阅读全文
posted @ 2018-05-12 14:07 lglh 阅读(171) 评论(0) 推荐(0) 编辑
摘要: As part of a CS course, Alice just finished programming her robot to explore a graph having n nodes, labeled 1, 2, . . . , n, and m directed edges. Ini 阅读全文
posted @ 2018-04-22 18:32 lglh 阅读(181) 评论(0) 推荐(0) 编辑