stones.cpp:4:9: error: 'pair' does not name a type
4 | typedef pair <int, int> pii;
| ^~~~
stones.cpp: In function 'int main()':
stones.cpp:12:9: error: 'ios_base' has not been declared
12 | ios_base::sync_with_stdio(0);
| ^~~~~~~~
stones.cpp:13:9: error: 'cin' was not declared in this scope
13 | cin.tie(0);
| ^~~
stones.cpp:1:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
+++ |+#include <iostream>
1 |
stones.cpp:25:25: error: 'swap' was not declared in this scope
25 | swap(n, m);
| ^~~~
stones.cpp:29:17: error: 'vector' was not declared in this scope
29 | vector <int> cnt(n, m);
| ^~~~~~
stones.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
+++ |+#include <vector>
1 |
stones.cpp:29:25: error: expected primary-expression before 'int'
29 | vector <int> cnt(n, m);
| ^~~
stones.cpp:37:33: error: 'cnt' was not declared in this scope; did you mean 'cont'?
37 | cnt[tmp]--;
| ^~~
| cont
stones.cpp:44:36: error: 'cnt' was not declared in this scope; did you mean 'cont'?
44 | if(cnt[tmp] <= m / 2)cont = 0;
| ^~~
| cont
stones.cpp:63:17: error: 'cout' was not declared in this scope
63 | cout << ans << endl;
| ^~~~
stones.cpp:63:17: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
stones.cpp:63:32: error: 'endl' was not declared in this scope
63 | cout << ans << endl;
| ^~~~
stones.cpp:1:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
+++ |+#include <ostream>
1 |