foo.cc: In function ‘int main()’:
foo.cc:10:9: error: ‘vector’ was not declared in this scope
10 | vector<char>a(n+1);
| ^~~~~~
foo.cc:4:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
3 | #include<cstring>
+++ |+#include <vector>
4 | using namespace std;
foo.cc:10:16: error: expected primary-expression before ‘char’
10 | vector<char>a(n+1);
| ^~~~
foo.cc:12:14: error: ‘a’ was not declared in this scope
12 | cin>>a[i];
| ^
foo.cc:16:20: error: ‘a’ was not declared in this scope
16 | if(a[l]=='H') ans++;
| ^
foo.cc:17:20: error: ‘a’ was not declared in this scope
17 | if(a[l]=='J') cnt++;
| ^