In the event of technical difficulties with Szkopuł, please contact us via email at [email protected].
If you would like to talk about tasks, solutions or technical problems, please visit our Discord servers. They are moderated by the community, but members of the support team are also active there.
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.