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)提供评测服务