Borderou de evaluare (job #2833440)
Utilizator | Data | 15 ianuarie 2022 11:03:55 | |
---|---|---|---|
Problema | Componente tare conexe | Status | done |
Runda | Arhiva educationala | Compilator | cpp-64 | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:6:20: error: conflicting declaration 'std::vector<std::vector<int> > g'
6 | vector<vector<int>>g,gt,comps;
| ^
main.cpp:4:10: note: previous declaration as 'std::ofstream g'
4 | ofstream g("ctc.out");
| ^
main.cpp: In function 'void dfs(int)':
main.cpp:13:17: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
13 | for(auto i:g[x])
| ^
main.cpp: In function 'int main()':
main.cpp:30:39: error: no match for 'operator=' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'std::vector<std::vector<int> >')
30 | g=gt=comps=vector<vector<int>>(n+1);
| ^
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:70,
from main.cpp:1:
/usr/include/c++/10/fstream:872:7: note: candidate: 'std::basic_ofstream<_CharT, _Traits>& std::basic_ofstream<_CharT, _Traits>::operator=(std::basic_ofstream<_CharT, _Traits>&&) [with _CharT = char; _Traits = std::char_traits<char>]'
872 | operator=(basic_ofstream&& __rhs)
| ^~~~~~~~
/usr/include/c++/10/fstream:872:34: note: no known conversion for argument 1 from 'std::vector<std::vector<int> >' to 'std::basic_ofstream<char>&&'
872 | operator=(basic_ofstream&& __rhs)
| ~~~~~~~~~~~~~~~~~^~~~~
main.cpp:36:10: error: no match for 'operator[]' (operand types are 'std::ofstream' {aka 'std::basic_ofstream<char>'} and 'int')
36 | g[x].push_back(y);
| ^
Non zero exit status: 1
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !