Problem nycheer
User yuanbin
Submission Time 2026-06-16 15:49:03
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nycheer.cpp: In function ‘int main()’:
nycheer.cpp:6:55: error: expected ‘}’ before ‘:’ token
6 | unordered_map<int, string> d = {{1,"Hey"},{2,"Ho"},{3:"Nanyang"}};
| ~ ^
nycheer.cpp:6:55: error: expected ‘}’ before ‘:’ token
nycheer.cpp:6:55: error: could not convert ‘{{1, "Hey"}, {2, "Ho"}, {3}}’ from ‘<brace-enclosed initializer list>’ to ‘std::unordered_map<int, std::__cxx11::basic_string<char> >’
nycheer.cpp: At global scope:
nycheer.cpp:6:66: error: expected declaration before ‘}’ token
6 | unordered_map<int, string> d = {{1,"Hey"},{2,"Ho"},{3:"Nanyang"}};
| ^
nycheer.cpp:8:2: error: ‘cin’ does not name a type
8 | cin>>a>>b;
| ^~~
nycheer.cpp:9:2: error: ‘cout’ does not name a type
9 | cout<<d[a]<<' '<<d[b];
| ^~~~