/ Vijos /

记录详情

Compile Error

foo.cc: In function ‘int main()’:
foo.cc:26:5: error: ‘unordered_map’ was not declared in this scope
   26 |     unordered_map<int, int> result;
      |     ^~~~~~~~~~~~~
foo.cc:6:1: note: ‘std::unordered_map’ is defined in header ‘<unordered_map>’; did you forget to ‘#include <unordered_map>’?
    5 | #include <unordered_set>
  +++ |+#include <unordered_map>
    6 | 
foo.cc:26:19: error: expected primary-expression before ‘int’
   26 |     unordered_map<int, int> result;
      |                   ^~~
foo.cc:32:9: error: ‘result’ was not declared in this scope
   32 |         result[x] = 0;
      |         ^~~~~~
foo.cc:70:17: error: ‘result’ was not declared in this scope
   70 |                 result[c]++;
      |                 ^~~~~~
foo.cc:77:22: error: ‘result’ was not declared in this scope
   77 |     for (auto iter = result.begin(); iter != result.end(); iter++) {
      |                      ^~~~~~

信息

递交者
类型
递交
题目
P1911 珠心算测验
语言
C++
递交时间
2024-03-27 13:04:00
评测时间
2024-03-27 13:04:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes