Borderou de evaluare (job #3327361)
| Utilizator | Data | 3 decembrie 2025 16:43:14 | |
|---|---|---|---|
| Problema | Algoritmul Bellman-Ford | Status | done |
| Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
main.cpp:4:1: error: 'ifstream' does not name a type
4 | ifstream cin("bellmanford.in");
| ^~~~~~~~
main.cpp:5:1: error: 'ofstream' does not name a type
5 | ofstream cout("bellmanford.out");
| ^~~~~~~~
main.cpp:7:24: warning: integer overflow in expression of type 'int' results in '2147483647' [-Woverflow]
7 | const int inf = (1<<31)-1;
| ~~~~~~~^~
main.cpp: In function 'void bellman_ford(int, int, int)':
main.cpp:39:9: error: 'cout' was not declared in this scope
39 | cout<<"Ciclu negativ!";
| ^~~~
main.cpp:4:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
3 | #include <fstream>
+++ |+#include <iostream>
4 | ifstream cin("bellmanford.in");
main.cpp:43:13: error: 'cout' was not declared in this scope
43 | cout<<dist[i]<<" ";
| ^~~~
main.cpp:43:13: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
main.cpp: In function 'int main()':
main.cpp:51:3: error: 'cin' was not declared in this scope
51 | cin>>n>>m;
| ^~~
main.cpp:51:3: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
