-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinput-backup.txt
127 lines (108 loc) · 4.66 KB
/
input-backup.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
/***************************************************************************************************
* Arquivo de entrada *
***************************************************************************************************/
/** Mapa de estacoes
*
* Diagrama esta baseado na descricao do teste.
* '*' Indica rotas de chegada na estacao
* (D) Indica a distancia
*
* ------------(3)-----------------
* | |
* | *
* | -(7)-[ A ]------(5)-------*[ B ]
* | | | |
* | | (5) (4)
* | | | |
* | * * *
* [ E ]*--[ D ] -----(8)-------*[ C ]
* * *-----(8)------- |
* | |
* ----------(2)------------------
*
* Mapeamento de todas as rotas disponiveis
* O SW esta trabalhando dinamicamente, podendo ser adicionadas novas rotas
* Para numeros decimais usar '.'
* Separador por virgula
*
*/
graph.routes = A-B5, BC4, CD8, DC8, DE6, AD5, CE2, EB3, AE7
/*****************************************************************************************************/
/** Questoes:
* 1. The distance of the route A-B-C.
* 2. The distance of the route A-D.
* 3. The distance of the route A-D-C.
* 4. The distance of the route A-E-B-C-D.
* 5. The distance of the route A-E-D.
*
* Mapeamento das rotas para calculo da distancia
* O hifem e opcional
* Separador virgula
* Possibilidade de adiconar novas rotas
*
*/
distance.routes = A-B-C , A-D , A-D-C , A-E-B-C-D , A-E-D
/*****************************************************************************************************/
/** Questoes:
* 6. The number of trips starting at C and ending at C with a maximum of 3 stops. In the sample
* data below, there are two such trips: C-D-C (2 stops). and C-E-B-C (3 stops).
*
* Verifica se as rotas indicadas na propriedade filtertrips[X].routes satifazem a condicao
* indicada em filtertrips[X].condition.
* Condicoes permitidas: <,>,<=,>=,==,!=
* Operandos permitidos STOPS,DISTANCE
* O hifem e opcional
* Rotas invalidas serao desconsideradas
* Importante: Separador por virgula
* Possibilidade de adiconar novos filtros,diferenciar atraves do index [X]
*
*/
filtertrips[1].condition = STOPS <= 3
filtertrips[1].routes = C-D-C , C-E-B-C
/*****************************************************************************************************/
/** Questoes:
* 7. The number of trips starting at A and ending at C with exactly 4 stops. In the sample data
* below, there are three such trips: A to C (via B,C,D); A to C (via D,C,D); and A to C (via D,E,B).
*
* Verifica se as rotas indicadas na propriedade filtertrips[X].routes satifazem a condicao
* indicada em filtertrips[X].condition.
* Condicoes permitidas: <,>,<=,>=,==,!=
* Operandos permitidos STOPS,DISTANCE
* O hifem e opcional
* Rotas invalidas serao desconsideradas
* Separador por virgula
* Possibilidade de adiconar novos filtros,diferenciar atraves do index [X]
*
*/
filtertrips[2].condition = STOPS==4
filtertrips[2].routes = A-B-C-D-C , A-D-C-D-C, A-D-E-B-C, AB
/*****************************************************************************************************/
/** Questoes:
* 8. The length of the shortest route (in terms of distance to travel) from A to C.
* 9. The length of the shortest route (in terms of distance to travel) from B to B.
*
* Encontra as opcoes de rotas menores(distancia) entre o ponto de partida e o de chegada
* Possibilidade de adiconar quantas viagens(rotas) necessarias.
* Rotas invalidas serao desconsideradas
* O hifem e opcional
* Separador virgula
*/
shortestRouter.trip = A-C , B-B
/*****************************************************************************************************/
/** Questoes:
* 10.The number of different routes from C to C with a distance of less than 30. In the sample
* data, the trips are: CDC, CEBC, CEBCDC, CDCEBC, CDEBC, CEBCEBC, CEBCEBCEBC.
*
* Verifica se as rotas indicadas na propriedade filtertrips[X].routes satifazem a condicao
* indicada em filtertrips[X].condition.
* Condicoes permitidas: <,>,<=,>=,==,!=
* Operandos permitidos STOPS,DISTANCE
* O hifem e opcional
* Rotas invalidas serao desconsideradas
* Separador por virgula
* Possibilidade de adiconar novos filtros,diferenciar atraves do index [X]
*
*/
filtertrips[3].condition = DISTANCE < 30
filtertrips[3].routes = CDC , CEBC , CEBCDC , CDCEBC , CDEBC , CEBCEBC , CEBCEBCEBC
/*****************************************************************************************************/