In the event of technical difficulties with Szkopuł, please contact us via email at [email protected].
If you are familiar with IRC chat, the support team is also reachable on PIRC network (irc.pirc.pl
) in #szkopul
channel. If you are not, just use email.
Please do not ask us things like "how to solve task XYZ?".
Please remember that the support team has to sleep sometimes or go to work in real life.
Byteman is going for a car trip around Byteland, but he is unfortunately unable to buy a map of the country. From his friends he learned about some properties of the bytean road network:
Write a program that:
The first and only line of input contains two integers and
(
,
), separated with a single space.
If no road network plan exists for the values of parameters and
from
the input, the first and only line of output should contain a single
word BRAK (i.e. none in Polish).
In the opposite case the output should consist of
lines.
Each line should contain a description of one bidirectional road -
two different integers in the range from
to
, separated with
a single space and denoting the numbers of cities connected by this road.
The order of roads and numbers of cities connected by roads in the output
can be arbitrary.
For the input data:
6 3
the correct result is:
1 3 2 3 3 4 4 5 4 6
Task author: Jakub Radoszewski.