PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#FW0000021. Số cặp ngôi nhà theo khoảng cách I (Count the Number of Houses at a Certain Distance I)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Số cặp ngôi nhà theo khoảng cách I (Count the Number of Houses at a Certain Distance I)

Count the Number of Houses at a Certain Distance I

Source: LeetCode

Version: Phuoc Hung OJ Extended

Problem Statement

Houses 11 through nn form a path with unit two-way roads; an extra two-way road connects xx and yy. For every distance k=1,…,nk=1,\ldots,n, count ordered pairs (i,j)(i,j) with i≠ji\ne j at shortest distance exactly kk.

Input

Three integers n,x,yn,x,y.

Output

Print nn counts for distances 11 through nn, separated by spaces.

Subtasks

  • Subtask 1 (40 points): n≤15n\le 15; 2≤n≤1002\le n\le 100; 1≤x,y≤n1\le x,y\le n.
  • Subtask 2 (60 points): 2≤n≤1002\le n\le 100; 1≤x,y≤n1\le x,y\le n.

Examples

Input

3 1 3

Output

6 0 0

Explanation

The extra road turns the three-house path into a triangle. All six ordered distinct pairs are at distance 11.