Borderou de evaluare (job #1710950)
| Utilizator | Data | 30 mai 2016 07:22:39 | |
|---|---|---|---|
| Problema | Diametrul unui arbore | Status | done |
| Runda | Arhiva educationala | Compilator | cpp | Vezi sursa |
| Scor | 0 | ||
Raport evaluator
Eroare de compilare:
user.cpp:9:22: error: conflicting declaration ‘std::vector<int> g [100001]’
vector <int> g[100001];
^
user.cpp:7:10: error: ‘g’ has a previous declaration as ‘std::ofstream g’
ofstream g("darb.out");
^
user.cpp: In function ‘void BFS(int, bool, std::queue<int>&)’:
user.cpp:22:20: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
for(i=0;i<g[z].size();i++)
^
user.cpp:24:20: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
if(!v[g[z][i]])
^
user.cpp:26:27: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
bfs.push(g[z][i]);
^
user.cpp:27:25: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
q.push(g[z][i]);
^
user.cpp:28:20: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
v[g[z][i]] = true;
^
user.cpp:30:26: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
sol[g[z][i]] = sol[z] + 1;
^
user.cpp: In function ‘int main()’:
user.cpp:44:10: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
g[a].push_back(b);
^
user.cpp:45:10: error: no match for ‘operator[]’ (operand types are ‘std::ofstream {aka std::basic_ofstream<char>}’ and ‘int’)
g[b].push_back(a);
^
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !
