Borderou de evaluare (job #2356976)
Utilizator | Data | 27 februarie 2019 01:22:49 | |
---|---|---|---|
Problema | Cezar | Status | done |
Runda | Arhiva de probleme | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:9:23: error: conflicting declaration 'int g [10005]'
int n, k, a, b, g[Nmax], cost[Nmax], ans, frunza;
^
main.cpp:7:10: note: previous declaration as 'std::ofstream g'
ofstream g("cezar.out");
^
main.cpp: In function 'int main()':
main.cpp:19:10: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int')
g[a]++; g[b]++;
^
main.cpp:19:18: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int')
g[a]++; g[b]++;
^
main.cpp:26:13: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int')
if(g[i] == 1)
^
main.cpp:33:10: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and 'int')
g[frunza]--;
^
main.cpp:34:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < v[frunza].size(); i++)
~~^~~~~~~~~~~~~~~~~~
main.cpp:35:17: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}')
if(g[v[frunza][i]] != 0)
^
main.cpp:37:18: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}')
g[v[frunza][i]]--;
^
main.cpp:40:21: error: no match for 'operator[]' (operand types are 'std::ofstream {aka std::basic_ofstream<char>}' and '__gnu_cxx::__alloc_traits<std::allocator<int> >::value_type {aka int}')
if(g[v[frunza][i]] == 1)q.push(v[frunza][i]);
^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !