Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

CWAY - Counting paths in a complete graph

A complete graph of N verticles is a graph in which there is an edge between every pair of nodes.

Your task is to count the number of paths between any pair of nodes in the graph. Note that a path cannot visit a vertex more than once.

Input

A single integer N that is the number of verticles in the graph (2 ≤ N ≤ 1000).

Output

A single integer that is the number of paths between any two nodes in the graph.

Example

Input
4

Output
5

Description
For example, there are 5 paths between 1 and 2:
1-2
1-3-2
1-3-4-2
1-4-2
1-4-3-2

Được gửi lên bởi:Lê Đôn Khuê
Ngày:2008-06-28
Thời gian chạy:1s
Giới hạn mã nguồn:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Ngôn ngữ cho phép:Tất cả ngoại trừ: ERL GOSU JS-RHINO NODEJS PERL6 PYPY RUST SED VB.NET
Nguồn bài:VNOI Marathon '08 - Round 3/DivB
Problem Setter: Lê Đôn Khuê

hide comments
2021-05-27 18:00:54
Tham khảo: https://vnspoj.github.io/problems/CWAY
2017-06-20 14:55:40
bài này phải dùng Code BIGNUM xịn (khoảng 500 dòng) mới AC nhé, code dỏm thì tạch
2017-05-17 15:57:11
đệ quy sao đc có 70 à
2017-02-27 14:46:36


Last edit: 2017-02-27 14:52:54
2016-10-08 11:39:03 Bui Van Hop
Viết 1 code trâu => công thức. Quy hoạch động + Xử lí số lớn => AC
2015-11-14 20:34:47 Sue
1 đấm AC :)))) cài bignum = vector c++ max tiện lợi :3
2015-09-08 14:19:35
https://thewizard6296.wordpress.com/2015/09/04/5/
2015-09-02 13:46:04
ae can than for 10d @@ kn xuong mau==
2015-06-15 09:15:53 there's no salvation for me...
đừng ai nghe thằng Le Long nhé :p mất mấy đấm đấy =))))
2015-06-15 05:48:06 [Nghien] Le Long
chỉ là đệ quy thôi mà =))
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.