Problem adjmatrix
User yongteckrice
Submission Time 2023-02-06 14:51:32
Score 0
Max Time N/A
Max Memory N/A

Compile Error

adjmatrix.cpp: In function ‘int main()’:
adjmatrix.cpp:24:18: error: invalid conversion from ‘const char*’ to ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} [-fpermissive]
24 | mp[e1][e2-1] = "1";
| ^~~
| |
| const char*
adjmatrix.cpp:25:18: error: invalid conversion from ‘const char*’ to ‘__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type’ {aka ‘char’} [-fpermissive]
25 | mp[e2][e1-1] = "1";
| ^~~
| |
| const char*
adjmatrix.cpp:28:29: error: could not convert ‘it’ from ‘std::_Rb_tree_iterator<std::pair<const int, std::__cxx11::basic_string<char> > >’ to ‘bool’
28 | for (auto it = mp.begin(); it! = mp.end(); it++)
| ^~
| |
|