answer.code: In function ‘_Tp read()’:
answer.code:6:13: error: there are no arguments to ‘getchar’ that depend on a template parameter, so a declaration of ‘getchar’ must be available [-fpermissive]
6 | char ch = getchar(), sgn = 0;
| ^~~~~~~
answer.code:6:13: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
answer.code:7:11: error: there are no arguments to ‘isdigit’ that depend on a template parameter, so a declaration of ‘isdigit’ must be available [-fpermissive]
7 | while (!isdigit(ch)) sgn |= ch == '-', ch = getchar();
| ^~~~~~~
answer.code:7:47: error: there are no arguments to ‘getchar’ that depend on a template parameter, so a declaration of ‘getchar’ must be available [-fpermissive]
7 | while (!isdigit(ch)) sgn |= ch == '-', ch = getchar();
| ^~~~~~~
answer.code:8:10: error: there are no arguments to ‘isdigit’ that depend on a template parameter, so a declaration of ‘isdigit’ must be available [-fpermissive]
8 | while (isdigit(ch)) ret = ret * 10 + ch - '0', ch = getchar();
| ^~~~~~~
answer.code:8:55: error: there are no arguments to ‘getchar’ that depend on a template parameter, so a declaration of ‘getchar’ must be available [-fpermissive]
8 | while (isdigit(ch)) ret = ret * 10 + ch - '0', ch = getchar();
| ^~~~~~~
answer.code: In function ‘int main()’:
answer.code:29:10: error: ‘sort’ is not a member of ‘std’
29 | std::sort(a + 1, a + n + 1, std::greater<int>());
| ^~~~
answer.code:29:38: error: ‘greater’ is not a member of ‘std’
29 | std::sort(a + 1, a + n + 1, std::greater<int>());
| ^~~~~~~
answer.code:29:46: error: expected primary-expression before ‘int’
29 | std::sort(a + 1, a + n + 1, std::greater<int>());
| ^~~
answer.code:30:10: error: ‘sort’ is not a member of ‘std’
30 | std::sort(b + 1, b + m + 1, std::greater<int>());
| ^~~~
answer.code:30:38: error: ‘greater’ is not a member of ‘std’
30 | std::sort(b + 1, b + m + 1, std::greater<int>());
| ^~~~~~~
answer.code:30:46: error: expected primary-expression before ‘int’
30 | std::sort(b + 1, b + m + 1, std::greater<int>());
| ^~~
answer.code:34:9: error: ‘puts’ was not declared in this scope
34 | puts("-1");
| ^~~~
answer.code:39:5: error: ‘printf’ was not declared in this scope
39 | printf("dis %d?\n", dis);
| ^~~~~~
answer.code:1:1: note: ‘printf’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
+++ |+#include <cstdio>
1 | // #include <bits/stdc++.h>
answer.code:41:7: error: ‘puts’ was not declared in this scope
41 | puts("-1");
| ^~~~
answer.code:54:7: error: ‘puts’ was not declared in this scope
54 | puts("-1");
| ^~~~
answer.code:59:7: error: ‘puts’ was not declared in this scope
59 | puts("HELLO");
| ^~~~
answer.code:63:10: error: ‘multiset’ is not a member of ‘std’
63 | std::multiset<int> S;
| ^~~~~~~~
answer.code:1:1: note: ‘std::multiset’ is defined in header ‘<set>’; did you forget to ‘#include <set>’?
+++ |+#include <set>
1 | // #include <bits/stdc++.h>
answer.code:63:19: error: expected primary-expression before ‘int’
63 | std::multiset<int> S;
| ^~~
answer.code:66:7: error: ‘S’ was not declared in this scope
66 | S.insert(a[i]);
| ^
answer.code:68:16: error: ‘S’ was not declared in this scope
68 | int x = *S.begin();
| ^
answer.code:73:5: error: ‘puts’ was not declared in this scope
73 | puts("");
| ^~~~
answer.code: In instantiation of ‘_Tp read() [with _Tp = int]’:
answer.code:21:15: required from here
answer.code:6:20: error: ‘getchar’ was not declared in this scope
6 | char ch = getchar(), sgn = 0;
| ~~~~~~~^~
answer.code:6:20: note: ‘getchar’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
answer.code:7:18: error: ‘isdigit’ was not declared in this scope
7 | while (!isdigit(ch)) sgn |= ch == '-', ch = getchar();
| ~~~~~~~^~~~
answer.code:8:17: error: ‘isdigit’ was not declared in this scope
8 | while (isdigit(ch)) ret = ret * 10 + ch - '0', ch = getchar();
| ~~~~~~~^~~~