Time Limit: 2000/1000 MS (Java/Others)

Memory Limit: 65536/32768 K (Java/Others)

The 3rd Zhejiang Provincial Collegiate Programming Contest will be held at Zhejiang University in 05/13/2006. The contest attracts many excellent programmer, of course, including 18 acmers of HDU,They are Lu xiaojun, Wang rongtao,Zhou feng;Gao bo, Li weigang, Xu haidong;Lin le,Lin jie,Li huansen;Mou changqing, Zhou lin, Wang dongdong;Ying qili,Lai li,Weng jianfei;Wang jun,Wang jianxing and Liu qi.

I don't know which team will be champion,but I know that closure will be held at Linshui Hall,which is a very beautiful classroom near the river.

Now I am thinking a question, supposing attendance is a square number (N^2) and the number of the seat is a square number too( N lines ,and N seats each line), If orgazizer is so bored that they arrange sits according to player's height (Supposing all players' heights are dirrerent). The arranging rules can be described as following:

1. A cannot sit at back of B when A is short than B.

2. A cannot sit at right of B when A is short than B.

The question left to you is that: " How many dirrerent arranging styles you can get according to the rules?"

I don't know which team will be champion,but I know that closure will be held at Linshui Hall,which is a very beautiful classroom near the river.

Now I am thinking a question, supposing attendance is a square number (N^2) and the number of the seat is a square number too( N lines ,and N seats each line), If orgazizer is so bored that they arrange sits according to player's height (Supposing all players' heights are dirrerent). The arranging rules can be described as following:

1. A cannot sit at back of B when A is short than B.

2. A cannot sit at right of B when A is short than B.

The question left to you is that: " How many dirrerent arranging styles you can get according to the rules?"

提交代码