Borderou de evaluare (job #3255265)
Utilizator | Data | 9 noiembrie 2024 21:16:46 | |
---|---|---|---|
Problema | Transport | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:4:1: error: expected ',' or ';' before 'ofstream'
4 | ofstream cout("transport.out")
| ^~~~~~~~
main.cpp: In function 'int main()':
main.cpp:8:12: error: 'n' was not declared in this scope
8 | cin >> n >> k;
| ^
main.cpp:8:17: error: 'k' was not declared in this scope
8 | cin >> n >> k;
| ^
main.cpp:12:16: error: 'v' was not declared in this scope
12 | cin >> v[i];
| ^
main.cpp:13:9: error: 's' was not declared in this scope
13 | s += v[i];
| ^
main.cpp:18:20: error: 's' was not declared in this scope
18 | int l = m, r = s, x, res = 1e9;
| ^
main.cpp:21:9: error: 'x' was not declared in this scope
21 | x = (l + r) / 2;
| ^
main.cpp:25:21: error: 'v' was not declared in this scope
25 | if (t + v[i] <= x) {
| ^
main.cpp:34:13: error: 'res' was not declared in this scope
34 | res = min(res, x);
| ^~~
main.cpp:41:5: error: 'cout' was not declared in this scope
41 | cout << res;
| ^~~~
main.cpp:2:1: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
1 | #include <fstream>
+++ |+#include <iostream>
2 | using namespace std;
main.cpp:41:13: error: 'res' was not declared in this scope
41 | cout << res;
| ^~~
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !