0_0_39024107_27453.cpp:3:5: error: 'string' does not name a type
3 | string name;
| ^~~~~~
0_0_39024107_27453.cpp:4:5: error: 'string' does not name a type
4 | string time;
| ^~~~~~
0_0_39024107_27453.cpp: In function 'bool cmp(player, player)':
0_0_39024107_27453.cpp:9:14: error: 'struct player' has no member named 'time'
9 | return a.time<b.time;
| ^~~~
0_0_39024107_27453.cpp:9:21: error: 'struct player' has no member named 'time'
9 | return a.time<b.time;
| ^~~~
0_0_39024107_27453.cpp: In function 'int main()':
0_0_39024107_27453.cpp:13:5: error: 'cin' was not declared in this scope
13 | cin>>n;
| ^~~
0_0_39024107_27453.cpp:1:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
+++ |+#include <iostream>
1 | using namespace std;
0_0_39024107_27453.cpp:15:5: error: 'vector' was not declared in this scope
15 | vector<int>rank(n+1,0);
| ^~~~~~
0_0_39024107_27453.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
+++ |+#include <vector>
1 | using namespace std;
0_0_39024107_27453.cpp:15:12: error: expected primary-expression before 'int'
15 | vector<int>rank(n+1,0);
| ^~~
0_0_39024107_27453.cpp:16:12: error: 'string' was not declared in this scope
16 | vector<string>names(n+1);
| ^~~~~~
0_0_39024107_27453.cpp:1:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
+++ |+#include <string>
1 | using namespace std;
0_0_39024107_27453.cpp:16:19: error: 'names' was not declared in this scope
16 | vector<string>names(n+1);
| ^~~~~
0_0_39024107_27453.cpp:20:19: error: 'struct player' has no member named 'name'
20 | cin>>p[i].name>>p[i].time;
| ^~~~
0_0_39024107_27453.cpp:20:30: error: 'struct player' has no member named 'time'
20 | cin>>p[i].name>>p[i].time;
| ^~~~
0_0_39024107_27453.cpp:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(p,p+n+1,cmp);
| ^~~~
| short
0_0_39024107_27453.cpp:25:22: error: 'struct player' has no member named 'time'
25 | if(i>1&&p[i].time==p[i-1].time)
| ^~~~
0_0_39024107_27453.cpp:25:35: error: 'struct player' has no member named 'time'
25 | if(i>1&&p[i].time==p[i-1].time)
| ^~~~
0_0_39024107_27453.cpp:27:27: error: 'struct player' has no member named 'name'
27 | names[i]=p[i].name;
| ^~~~
0_0_39024107_27453.cpp:28:13: error: 'rank' was not declared in this scope
28 | rank[i]=i-1;
| ^~~~
0_0_39024107_27453.cpp:29:21: error: 'struct player' has no member named 'name'
29 | if(p[i].name<p[i-1].name)
| ^~~~
0_0_39024107_27453.cpp:29:33: error: 'struct player' has no member named 'name'
29 | if(p[i].name<p[i-1].name)
| ^~~~
0_0_39024107_27453.cpp:31:17: error: 'swap' was not declared in this scope
31 | swap(names[i],names[i-1]);
| ^~~~
0_0_39024107_27453.cpp:36:27: error: 'struct player' has no member named 'name'
36 | names[i]=p[i].name;
| ^~~~
0_0_39024107_27453.cpp:37:13: error: 'rank' was not declared in this scope
37 | rank[i]=i;
| ^~~~
0_0_39024107_27453.cpp:42:9: error: 'cout' was not declared in this scope
42 | cout<<names[i]<<' '<<rank[i]<<endl;
| ^~~~
0_0_39024107_27453.cpp:42:9: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
0_0_39024107_27453.cpp:42:30: error: 'rank' was not declared in this scope
42 | cout<<names[i]<<' '<<rank[i]<<endl;
| ^~~~
0_0_39024107_27453.cpp:42:39: error: 'endl' was not declared in this scope
42 | cout<<names[i]<<' '<<rank[i]<<endl;
| ^~~~
0_0_39024107_27453.cpp:1:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
+++ |+#include <ostream>
1 | using namespace std;
|