Всего постов: 130
Бород: 75
Рейтинг: +14|12|-12 = +52%
Босые дети. Холод.
Голодные и босые дети. Босые, легко одетые дети выбегали утром на снег. В голоде и холоде изголодавшиеся дети в большинстве случаев босые, дрожащие от холода. Обжигая ноги босые холодом. Под босыми ногами холод. Босые холода. Босые, оборванные, голодные, трясясь от холода, дрожа от холода и страха. Босым танцорам не страшен северный холод - Индия!
Голодные и босые дети. Босые, легко одетые дети выбегали утром на снег. В голоде и холоде изголодавшиеся дети в большинстве случаев босые, дрожащие от холода. Обжигая ноги босые холодом. Под босыми ногами холод. Босые холода. Босые, оборванные, голодные, трясясь от холода, дрожа от холода и страха. Босым танцорам не страшен северный холод - Индия!
Всего постов: 130
Бород: 82
Рейтинг: +10|7|-9 = +50%
* "THE BEER-WARE LICENSE" (Revision 42):
* wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
*
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
Всего постов: 130
Бород: 100
Рейтинг: +5|16|-12 = -13%
public void dijkstra(Vertice v) {
Heap heap = new Heap();
heap.inserir( v, v, 0);
v.marcado = true;
while (! heap.estahVazio() ) {
Aresta a = heap.remover();
NoLista temp = vertices[a.destino].lista.inicio;
while( temp != null) {
if( !vertices[temp.destino].marcado ) {
vertices[temp.destino].marcado = true;
Aresta aresta = new Aresta(a.destino, temp.destino, temp.custo );
heap.inserir(aresta);
} else {
if ( vertices[temp.destino].menorCaminho > (vertices[a.destino].menorCaminho + temp.custo) ) {
vertices[temp.destino].menorCaminho = (vertices[a.destino].menorCaminho + temp.custo);
Aresta aresta2 = new Aresta(a.destino, temp.destino, temp.custo)
heap.inserir(aresta2);
}
}
temp = temp.prox;
} // fim do while temp
}// fim do heapvazio
Heap heap = new Heap();
heap.inserir( v, v, 0);
v.marcado = true;
while (! heap.estahVazio() ) {
Aresta a = heap.remover();
NoLista temp = vertices[a.destino].lista.inicio;
while( temp != null) {
if( !vertices[temp.destino].marcado ) {
vertices[temp.destino].marcado = true;
Aresta aresta = new Aresta(a.destino, temp.destino, temp.custo );
heap.inserir(aresta);
} else {
if ( vertices[temp.destino].menorCaminho > (vertices[a.destino].menorCaminho + temp.custo) ) {
vertices[temp.destino].menorCaminho = (vertices[a.destino].menorCaminho + temp.custo);
Aresta aresta2 = new Aresta(a.destino, temp.destino, temp.custo)
heap.inserir(aresta2);
}
}
temp = temp.prox;
} // fim do while temp
}// fim do heapvazio
Всего постов: 130
Бород: 76
Рейтинг: +12|15|-26 = -6%
Вышедший на тупые экраны кинотеатров тупой блокбастер "Тупее тупей тупого и ещё тупее тупей тупей тупей тупей тупого" собрал 1233 млн. тупых долларов за первый день тупого проката.