D
D
DavidJarr2019-03-29 18:09:47
C++ / C#
DavidJarr, 2019-03-29 18:09:47

c++ join matrix?

Hello everyone, I need to implement a similar task in C ++, the problem is that I don’t understand what exactly they want from me in this task and what exactly do I need to implement?
The task itself:
"A line is called unicursal if it can be drawn without lifting the pen from the paper and without passing the same edge twice. (Note that the line is unicursal only when the number of nodes from which an odd number of edges follows is not more than two). A line that contains n nodes can be defined by a square connection matrix, (of order n), in which the element aij =1 if node i is connected to node j by an edge that does not contain other nodes.
Task: enter the number of nodes of some line. Given an arbitrary connection matrix (interactively or randomly), determine whether such a line is unicursal and, if so, obtain a sequence of node numbers that will be traversed to cross out the line.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
longclaps, 2019-03-29
@longclaps

Euler path

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question