记录详情

Compile Error

/in/foo.cc:3:1: error: 'map' does not name a type
 map<string,int> q; 
 ^~~
/in/foo.cc:5:1: error: 'string' does not name a type; did you mean 'stdin'?
 string a,c;
 ^~~~~~
 stdin
/in/foo.cc: In function 'int main()':
/in/foo.cc:9:2: error: 'cin' was not declared in this scope
  cin>>n;
  ^~~
/in/foo.cc:9:2: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0,
                 from /in/foo.cc:1:
/usr/include/c++/7/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^~~
/in/foo.cc:12:8: error: 'a' was not declared in this scope
   cin>>a>>b;
        ^
/in/foo.cc:13:3: error: 'q' was not declared in this scope
   q[a]+=b;
   ^
/in/foo.cc:17:4: error: 'c' was not declared in this scope
    c=a;
    ^
/in/foo.cc:21:2: error: 'cout' was not declared in this scope
  cout<<c<<endl;
  ^~~~
/in/foo.cc:21:2: note: suggested alternative:
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:75:0,
                 from /in/foo.cc:1:
/usr/include/c++/7/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^~~~
/in/foo.cc:21:8: error: 'c' was not declared in this scope
  cout<<c<<endl;
        ^
/in/foo.cc:21:11: error: 'endl' was not declared in this scope
  cout<<c<<endl;
           ^~~~
/in/foo.cc:21:11: note: suggested alternative:
In file included from /usr/include/c++/7/istream:39:0,
                 from /usr/include/c++/7/sstream:38,
                 from /usr/include/c++/7/complex:45,
                 from /usr/include/c++/7/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/7/ostream:590:5: note:   'std::endl'
     endl(basic_ostream<_CharT, _Traits>& __os)
     ^~~~

信息

递交者
类型
递交
题目
#1、赢家
题目数据
下载
语言
C++
递交时间
2018-11-08 19:00:53
评测时间
2018-11-08 19:00:53
评测机
分数
0
总耗时
1126ms
峰值内存
132.688 MiB