Borderou de evaluare (job #1752388)
| Utilizator | Data | 3 septembrie 2016 18:24:26 | |
|---|---|---|---|
| Problema | Algoritmul lui Dijkstra | Status | done |
| Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
user.cpp:9:58: error: size of array ‘cost’ is too large
int h[NMAX], positions[NMAX], drum[NMAX], cost[NMAX][NMAX]; // H[] - stores values by their read order
^
user.cpp: In function ‘void dijkstra()’:
user.cpp:83:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i=0; i<graph[minim].size(); ++i)
^
user.cpp:86:29: error: ‘cost’ was not declared in this scope
if (drum[minim]+cost[minim][node] < drum[node])
^
user.cpp: In function ‘int main()’:
user.cpp:116:9: error: ‘cost’ was not declared in this scope
cost[x][y] = c;
^
user.cpp:106:39: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("dijkstra.in", "r", stdin);
^
user.cpp:107:41: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
freopen("dijkstra.out", "w", stdout);
^
user.cpp:109:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &m);
^
user.cpp:114:36: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d", &x, &y, &c);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
