• 沒有找到結果。

A B2-Sequence is a sequence of positive integers 1 ≤ b

N/A
N/A
Protected

Academic year: 2021

Share "A B2-Sequence is a sequence of positive integers 1 ≤ b"

Copied!
1
0
0

加載中.... (立即查看全文)

全文

(1)

11063 B2-Sequence

A B2-Sequence is a sequence of positive integers 1 ≤ b

1

< b

2

< b

3

. . . such that all pairwise sums b

i

+ b

j

, where i ≤ j, are different.

Your task is to determine if a given sequence is a B2-Sequence or not.

Input

Each test case starts with 2 ≤ N ≤ 100, the number of elements in a sequence. Next line will have N integers, representing the value of each element in the sequence. Each element b

i

is an integer such that b

i

≤ 10000. There is a blank line after each test case. The input is terminated by end of file (EOF).

Output

For each test case you must print the number of the test case, starting from 1, and a message indicating if the corresponding sequence it is a B2-Sequence or not. See the sample output below. After each test case you must print a blank line.

Sample Input 4

1 2 4 8 4

3 7 10 14 Sample Output

Case #1: It is a B2-Sequence.

Case #2: It is not a B2-Sequence.

參考文獻

相關文件

Note: BCGD has stronger global convergence property (and cheaper iteration) than BCM..1. Every cluster point of the x-sequence is a minimizer

More precisely, it is the problem of partitioning a positive integer m into n positive integers such that any of the numbers is less than the sum of the remaining n − 1

For periodic sequence (with period n) that has exactly one of each 1 ∼ n in any group, we can find the least upper bound of the number of converged-routes... Elementary number

(a) A special school for children with hearing impairment may appoint 1 additional non-graduate resource teacher in its primary section to provide remedial teaching support to

The algorithms have potential applications in several ar- eas of biomolecular sequence analysis including locating GC-rich regions in a genomic DNA sequence, post-processing

It is interesting that almost every numbers share a same value in terms of the geometric mean of the coefficients of the continued fraction expansion, and that K 0 itself is

• A sequence of numbers between 1 and d results in a walk on the graph if given the starting node.. – E.g., (1, 3, 2, 2, 1, 3) from

Every sequence of n 2 +1 distinct real numbers contains a subsequence of length n+1 that is either strictly increasing or strictly decreasing.