foo.cc: In function 'int main()':
foo.cc:18:16: error: invalid types '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}[int]' for array subscript
18 | strcpy(a[i][2],s.substr(i,2));
| ^
foo.cc:18:20: error: request for member 'substr' in 's', which is of non-class type 'char [100000]'
18 | strcpy(a[i][2],s.substr(i,2));
| ^~~~~~
foo.cc:23:24: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
23 | {if((strcmp(a[j],a[k])==0)
| ^
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/9/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:48,
from foo.cc:1:
/usr/include/string.h:137:32: note: initializing argument 1 of 'int strcmp(const char*, const char*)'
137 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
foo.cc:23:24: error: invalid conversion from '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} to 'const char*' [-fpermissive]
23 | {if((strcmp(a[j],a[k])==0)
| ^
| |
| __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type {aka char}
In file included from /usr/include/c++/9/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:48,
from foo.cc:1:
/usr/include/string.h:137:50: note: initializing argument 2 of 'int strcmp(const char*, const char*)'
137 | extern int strcmp (const char *__s1, const char *__s2)
| ~~~~~~~~~~~~^~~~
foo.cc:23:29: error: expected ')' before '{' token
23 | {if((strcmp(a[j],a[k])==0)
| ~ ^
| )
24 |
25 | {
| ~
foo.cc:29:3: error: expected primary-expression before '}' token
29 | }
| ^
foo.cc:33:11: error: invalid types 'int[int]' for array subscript
33 | if (b[i]>3)
| ^
[Hydro](https://hydro.ac)提供评测服务