SP1707 RELINETS - Reliable Nets

Description

You’re in charge of designing a campus network between buildings and are very worried about its reliability and its cost. So, you’ve decided to build some redundancy into your network while keeping it as inexpensive as possible. Specifically, you want to build the cheapest network so that if any one line is broken, all buildings can still communicate. We’ll call this a _minimal reliable net_.

Input Format

There will be multiple test cases for this problem. Each test case will start with a pair of integers n (

Output Format

For each test case you should print one line giving the cost of a minimal reliable net. If there is a minimal reliable net, the output line should be of the form: **_The minimal cost for test case p is c._** where _p_ is the number of the test case (starting at 1) and _c_ is the cost. If there is no reliable net possible, output a line of the form: There is no reliable net possible for test case p.