Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Enchente
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Vytor Calixto
Enchente
Commits
90d49316
Commit
90d49316
authored
8 years ago
by
Vytor Calixto
Browse files
Options
Downloads
Patches
Plain Diff
Commit inicial
parent
bc0b4155
No related branches found
No related tags found
1 merge request
!1
Develop
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
Makefile
+1
-0
1 addition, 0 deletions
Makefile
main.c
+33
-0
33 additions, 0 deletions
main.c
tests/1
+5
-0
5 additions, 0 deletions
tests/1
with
40 additions
and
0 deletions
.gitignore
0 → 100644
+
1
−
0
View file @
90d49316
f
This diff is collapsed.
Click to expand it.
Makefile
0 → 100644
+
1
−
0
View file @
90d49316
w
This diff is collapsed.
Click to expand it.
main.c
0 → 100644
+
33
−
0
View file @
90d49316
#include
<stdlib.h>
#include
<stdio.h>
#include
<time.h>
int
main
(
int
argc
,
char
const
*
argv
[])
{
printf
(
"Ler o tabuleiro (em matriz?)
\n
"
);
printf
(
"Enquanto pilha não vazia:
\n
"
);
printf
(
"
\t
Pega os adjacentes do grupo (retorna os pesos dos filhos = montar o grafo)
\n
"
);
printf
(
"
\t
Escolhe filho de maior peso
\n
"
);
printf
(
"
\t
Empilha os outros filhos
\n
"
);
printf
(
"
\t
SE tamanho do caminho atual + filhos do nodo atual >= menor caminho: VOLTA!
\n
"
);
printf
(
"
\t
SE soma do peso total = tamanho do tabuleiro: VOLTA! Retorna o caminho encontrado
\n
"
);
return
0
;
}
// pilha global
// {
// identificador: "passo"
// valor original
// posição
// }
// {
// identificador: 4
// valor original: 2
// posição: 0,0
// },
// {
// identificador: 5
// valor original: 4
// posição: 0,0 - 0,1 - 1,0 - 2,0
// }
//
This diff is collapsed.
Click to expand it.
tests/1
0 → 100644
+
5
−
0
View file @
90d49316
4 5 3
2 3 2 3 2
2 1 2 3 3
3 1 2 3 2
1 2 2 1 3
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment