| Problem | bracketex |
|---|---|
| User | XY3491 |
| Submission Time | 2026-04-18 10:10:01 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
bracketex.cpp: In function ‘int main()’:
bracketex.cpp:11:23: error: cannot convert ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’} to ‘const char*’
11 | for(int i=0;i<strlen(s);++i)
| ^
| |
| std::string {aka std::__cxx11::basic_string<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 bracketex.cpp:1:
/usr/include/string.h:385:35: note: initializing argument 1 of ‘size_t strlen(const char*)’
385 | extern size_t strlen (const char *__s)
| ~~~~~~~~~~~~^~~
bracketex.cpp:15:12: error: no match for ‘operator[]’ (operand types are ‘std::stack<int>’ and ‘int’)
15 | a.push(a[i]);
| ^
bracketex.cpp:19:8: error: no match for ‘operator[]’ (operand types are ‘std::stack<int&g