<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ro">
	<id>http://wiki.dcae.pub.ro/index.php?action=history&amp;feed=atom&amp;title=DSA_Homework_6</id>
	<title>DSA Homework 6 - Revizia istoricului</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.dcae.pub.ro/index.php?action=history&amp;feed=atom&amp;title=DSA_Homework_6"/>
	<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=DSA_Homework_6&amp;action=history"/>
	<updated>2026-05-31T10:44:19Z</updated>
	<subtitle>Istoricul versiunilor pentru această pagină din wiki</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>http://wiki.dcae.pub.ro/index.php?title=DSA_Homework_6&amp;diff=2204&amp;oldid=prev</id>
		<title>Rhobincu: Pagină nouă: = GPS =  Little John was promoted to Senior Software Engineer. His first project is to write an engine for a next generation GPS device. What he has to do is to implement an algorithm...</title>
		<link rel="alternate" type="text/html" href="http://wiki.dcae.pub.ro/index.php?title=DSA_Homework_6&amp;diff=2204&amp;oldid=prev"/>
		<updated>2014-05-11T18:23:46Z</updated>

		<summary type="html">&lt;p&gt;Pagină nouă: = GPS =  Little John was promoted to Senior Software Engineer. His first project is to write an engine for a next generation GPS device. What he has to do is to implement an algorithm...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pagină nouă&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= GPS =&lt;br /&gt;
&lt;br /&gt;
Little John was promoted to Senior Software Engineer. His first project is to write an engine for a next generation GPS device. What he has to do is to implement an algorithm to find the shortest route from the starting point to the destination. The map has already been translated and is represented as a graph where intersections are nodes, and streets and edges. Since some streets are only one-way, this graph is an oriented graph. &lt;br /&gt;
&lt;br /&gt;
Help Little John write this program.&lt;br /&gt;
&lt;br /&gt;
== Requirement ==&lt;br /&gt;
&lt;br /&gt;
Given an oriented graph, find the shortest path between the source node and the destination node.&lt;br /&gt;
&lt;br /&gt;
== Input Data ==&lt;br /&gt;
&lt;br /&gt;
A file called &amp;#039;&amp;#039;gps.in&amp;#039;&amp;#039;, containing the number of intersections N on the first line, and N x N subsequent values, defining the adjacency matrix, arranged in a square, on N lines. A value of -1 in the adjacency means that there is no route between those nodes. The last line contains the starting node and the destination node.&lt;br /&gt;
&lt;br /&gt;
== Output Data ==&lt;br /&gt;
&lt;br /&gt;
A file called &amp;#039;&amp;#039;gps.out&amp;#039;&amp;#039;, containing the cost of the shortest route (or -1 if there is none) on the first line and the path itself on the second line (the second line is missing if there is no route). &lt;br /&gt;
&lt;br /&gt;
== Restrictions ==&lt;br /&gt;
1 ≤ N ≤ 1000&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#ddeeff&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039;Input&amp;#039;&amp;#039;&amp;#039; || &amp;#039;&amp;#039;&amp;#039;Output&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|- bgcolor=&amp;quot;#ddffdd&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size:12px&amp;quot;&amp;gt;&lt;br /&gt;
7&lt;br /&gt;
 0 -1  1  1 -1  2 -1&lt;br /&gt;
 3  0  1 -1 -1 -1 -1&lt;br /&gt;
-1  2  0 -1  2 -1 -1&lt;br /&gt;
-1 -1 -1  0  5 -1  2&lt;br /&gt;
-1 -1  2  5  0 -1 -1&lt;br /&gt;
-1 -1 -1 -1 -1  0  2&lt;br /&gt;
-1 -1 -1 -1  1 -1  0&lt;br /&gt;
5 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size:12px&amp;quot;&amp;gt;&lt;br /&gt;
10&lt;br /&gt;
5 6 4 2 1 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|-  bgcolor=&amp;quot;#ddffdd&amp;quot; align=&amp;quot;left&amp;quot;&lt;br /&gt;
|&amp;lt;pre style=&amp;quot;font-size:12px&amp;quot;&amp;gt;&lt;br /&gt;
7&lt;br /&gt;
 0 -1  1  1 -1  2 -1&lt;br /&gt;
 3  0  1 -1 -1 -1 -1&lt;br /&gt;
-1  2  0 -1  2 -1 -1&lt;br /&gt;
-1 -1 -1  0  5 -1  2&lt;br /&gt;
-1 -1 -1  5  0 -1 -1&lt;br /&gt;
-1 -1 -1 -1 -1  0  2&lt;br /&gt;
-1 -1 -1 -1  1 -1  0&lt;br /&gt;
5 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size:12px&amp;quot;&amp;gt;&lt;br /&gt;
-1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Rhobincu</name></author>
	</entry>
</feed>