/ Vijos /

记录详情

Compile Error

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++;
      |                    ^

信息

递交者
类型
递交
题目
P1331 看球的巴士
语言
C++
递交时间
2024-08-16 14:39:44
评测时间
2024-08-16 14:39:44
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes