Borderou de evaluare (job #2919355)
Utilizator | Data | 16 august 2022 20:30:41 | |
---|---|---|---|
Problema | Ghiozdan | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'void __strprint(const std::pair<_T1, _T2>&)':
main.cpp:118:138: error: return-statement with a value, in function returning 'void' [-fpermissive]
118 | void __strprint(const pair<T, V> &x) {string build="{"; build+=__strprint(x.first); build+=","; build+=__strprint(x.second); return build+"}";}
| ~~~~~^~~~
main.cpp: In function 'void __strprint(const T&)':
main.cpp:120:135: error: return-statement with a value, in function returning 'void' [-fpermissive]
120 | void __strprint(const T &x) {int f = 0; string build="{"; for (auto &i: x) build+=(f++ ? "," : ""), build+=__strprint(i); return build+"}";}
| ~~~~~^~~~
main.cpp: In function 'std::vector<int> knapsack_(int, int, int, int, int*, int*)':
main.cpp:183:5: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
183 | if (N - startItem == 1) if (a[startItem] <= (W-startWeight)) return vector<int> {1}; else return vector<int> {0};
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !