/ MYOJ /

记录详情

Compile Error

foo.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
 string s,t;
 ^~~~~~
 stdin
foo.cc: In function 'int main()':
foo.cc:6:1: error: 'cin' was not declared in this scope
 cin>>n;d=100/n;
 ^~~
foo.cc:6:1: note: suggested alternative:
In file included from foo.cc:1:0:
/usr/include/c++/7/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^~~
foo.cc:7:28: error: 's' was not declared in this scope
 for(int i=1;i<=n;i++){cin>>s>>t;if(s==t) tot+=d;}
                            ^
foo.cc:7:31: error: 't' was not declared in this scope
 for(int i=1;i<=n;i++){cin>>s>>t;if(s==t) tot+=d;}
                               ^
foo.cc:8:12: error: 'cout' was not declared in this scope
 if(tot==0) cout<<"WA";
            ^~~~
foo.cc:8:12: note: suggested alternative:
In file included from foo.cc:1:0:
/usr/include/c++/7/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^~~~
foo.cc:9:19: error: 'cout' was not declared in this scope
 else if(tot==100) cout<<"AC";
                   ^~~~
foo.cc:9:19: note: suggested alternative:
In file included from foo.cc:1:0:
/usr/include/c++/7/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^~~~
foo.cc:10:6: error: 'cout' was not declared in this scope
 else cout<<d;
      ^~~~
foo.cc:10:6: note: suggested alternative:
In file included from foo.cc:1:0:
/usr/include/c++/7/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^~~~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1005 史上最简单的问题
语言
C++
递交时间
2021-07-10 22:16:15
评测时间
2021-07-10 22:16:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes