Problem | contestcalc |
---|---|
User | wongethan8192 |
Submission Time | 2023-02-17 16:55:16 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
contestcalc.cpp: In function ‘int main()’:
contestcalc.cpp:5:1: error: ‘map’ was not declared in this scope
5 | map<string,int>M;
| ^~~
contestcalc.cpp:2:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
1 | #include <iostream>
+++ |+#include <map>
2 | using namespace std;
contestcalc.cpp:5:11: error: expected primary-expression before ‘,’ token
5 | map<string,int>M;
| ^
contestcalc.cpp:5:12: error: expected primary-expression before ‘int’
5 | map<string,int>M;
| ^~~
contestcalc.cpp:6:47: error: ‘M’ was not declared in this scope
6 | for(int i=0;i<H;i++){string j;int k;cin>>j>>k;M[j]=k;}
| ^
contestcalc.cpp:9:41: error: ‘M’ was not declared in this scope
9 | for(int q=0;q<s;q++){string L;cin>>L;X+=M[L];}cout<&l