Borderou de evaluare (job #1426187)

Utilizator supremusChihalau Andrei supremus Data 29 aprilie 2015 08:34:06
Problema Ciclu Eulerian Status done
Runda Arhiva educationala Compilator cpp | Vezi sursa
Scor 0

Raport evaluator

Eroare de compilare: user.cpp:8:22: error: conflicting declaration ‘std::vector<int> g [100001]’ vector <int> g[100001]; ^ user.cpp:6:10: error: ‘g’ has a previous declaration as ‘std::ofstream g’ ofstream g("ciclueuler.out"); ^ user.cpp: In function ‘void euler(int)’: user.cpp:14:12: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) while(g[u].size()!=0) ^ user.cpp:16:12: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) v=g[u].back(); ^ user.cpp:17:10: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) g[u].pop_back(); ^ user.cpp:18:24: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) for(int j=0;j<g[v].size();j++) ^ user.cpp:19:13: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) if(g[v][j]==u) ^ user.cpp:21:22: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) int aux=g[v][j]; ^ user.cpp:22:14: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) g[v][j]=g[v][g[v].size()-1]; ^ user.cpp:22:22: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) g[v][j]=g[v][g[v].size()-1]; ^ user.cpp:22:27: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) g[v][j]=g[v][g[v].size()-1]; ^ user.cpp:23:14: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) g[v].pop_back(); ^ user.cpp:21:17: warning: unused variable ‘aux’ [-Wunused-variable] int aux=g[v][j]; ^ user.cpp: In function ‘int main()’: user.cpp:38:10: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) g[x].push_back(y); ^ user.cpp:39:10: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) g[y].push_back(x); ^ user.cpp:42:13: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’) if(g[i].size()%2!=0) ^

Ceva nu functioneaza?