jobs.cpp:3:21: error: expected ';' before 'll'
3 | using ll = long long ll;
| ^~~
| ;
jobs.cpp:5:11: error: 'll' was not declared in this scope
5 | bool calc(ll n, ll d, ll x, vector<ll> &arr, ll m)
| ^~
jobs.cpp:5:17: error: 'll' was not declared in this scope
5 | bool calc(ll n, ll d, ll x, vector<ll> &arr, ll m)
| ^~
jobs.cpp:5:23: error: 'll' was not declared in this scope
5 | bool calc(ll n, ll d, ll x, vector<ll> &arr, ll m)
| ^~
jobs.cpp:5:36: error: 'll' was not declared in this scope
5 | bool calc(ll n, ll d, ll x, vector<ll> &arr, ll m)
| ^~
jobs.cpp:5:38: error: template argument 1 is invalid
5 | bool calc(ll n, ll d, ll x, vector<ll> &arr, ll m)
| ^
jobs.cpp:5:38: error: template argument 2 is invalid
jobs.cpp:5:41: error: 'arr' was not declared in this scope
5 | bool calc(ll n, ll d, ll x, vector<ll> &arr, ll m)
| ^~~
jobs.cpp:5:46: error: 'll' was not declared in this scope
5 | bool calc(ll n, ll d, ll x, vector<ll> &arr, ll m)
| ^~
jobs.cpp:5:50: error: expression list treated as compound expression in initializer [-fpermissive]
5 | bool calc(ll n, ll d, ll x, vector<ll> &arr, ll m)
| ^
jobs.cpp: In function 'void solve()':
jobs.cpp:30:5: error: 'll' was not declared in this scope
30 | ll n, d, m;
| ^~
jobs.cpp:31:12: error: 'n' was not declared in this scope; did you mean 'yn'?
31 | cin >> n >> d >> m;
| ^
| yn
jobs.cpp:31:17: error: 'd' was not declared in this scope
31 | cin >> n >> d >> m;
| ^
jobs.cpp:31:22: error: 'm' was not declared in this scope; did you mean 'tm'?
31 | cin >> n >> d >> m;
| ^
| tm
jobs.cpp:32:14: error: template argument 2 is invalid
32 | vector<ll> arr(m, 0);
| ^
jobs.cpp:32:24: error: expression list treated as compound expression in initializer [-fpermissive]
32 | vector<ll> arr(m, 0);
| ^
jobs.cpp:33:23: error: template argument 1 is invalid
33 | vector<pair<ll, ll>> brr;
| ^~
jobs.cpp:33:23: error: template argument 2 is invalid
jobs.cpp:34:12: error: expected ';' before 'i'
34 | for (ll i = 0; i < m; i++)
| ^~
| ;
jobs.cpp:34:20: error: 'i' was not declared in this scope
34 | for (ll i = 0; i < m; i++)
| ^
jobs.cpp:37:13: error: request for member 'push_back' in 'brr', which is of non-class type 'int'
37 | brr.push_back({arr[i], i + 1});
| ^~~~~~~~~
jobs.cpp:39:14: error: request for member 'begin' in 'brr', which is of non-class type 'int'
39 | sort(brr.begin(), brr.end());
| ^~~~~
jobs.cpp:39:27: error: request for member 'end' in 'brr', which is of non-class type 'int'
39 | sort(brr.begin(), brr.end());
| ^~~
jobs.cpp:40:14: error: request for member 'begin' in 'arr', which is of non-class type 'int'
40 | sort(arr.begin(), arr.end());
| ^~~~~
jobs.cpp:40:27: error: request for member 'end' in 'arr', which is of non-class type 'int'
40 | sort(arr.begin(), arr.end());
| ^~~
jobs.cpp:41:7: error: expected ';' before 'l'
41 | ll l = 1, r = 1e15, ans = 1e6;
| ^~
| ;
jobs.cpp:42:12: error: 'l' was not declared in this scope
42 | while (l <= r)
| ^
jobs.cpp:42:17: error: 'r' was not declared in this scope
42 | while (l <= r)
| ^
jobs.cpp:44:11: error: expected ';' before 'mid'
44 | ll mid = (l + r) / 2;
| ^~~~
| ;
jobs.cpp:45:24: error: 'mid' was not declared in this scope
45 | if (calc(n, d, mid, arr, m))
| ^~~
jobs.cpp:45:35: error: 'calc' cannot be used as a function
45 | if (calc(n, d, mid, arr, m))
| ^
jobs.cpp:47:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
47 | ans = mid;
| ^~~
| abs
jobs.cpp:55:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
55 | cout << ans << "\n";
| ^~~
| abs
jobs.cpp:56:7: error: expected ';' before 'k'
56 | ll k = 0, rem = 0;
| ^~
| ;
jobs.cpp:57:20: error: 'begin' was not declared in this scope; did you mean 'std::begin'?
57 | for (auto &i : brr)
| ^~~
| std::begin
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from jobs.cpp:1:
/usr/include/c++/10/valarray:1224:5: note: 'std::begin' declared here
1224 | begin(const valarray<_Tp>& __va)
| ^~~~~
jobs.cpp:57:20: error: 'end' was not declared in this scope; did you mean 'std::end'?
57 | for (auto &i : brr)
| ^~~
| std::end
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:95,
from jobs.cpp:1:
/usr/include/c++/10/valarray:1244:5: note: 'std::end' declared here
1244 | end(const valarray<_Tp>& __va)
| ^~~
jobs.cpp:59:13: error: 'k' was not declared in this scope
59 | if (k == ans)
| ^
jobs.cpp:63:13: error: 'rem' was not declared in this scope; did you mean 'drem'?
63 | rem++;
| ^~~
| drem
jobs.cpp:66:9: error: 'k' was not declared in this scope
66 | k++;
| ^
jobs.cpp:68:5: error: 'rem' was not declared in this scope; did you mean 'drem'?
68 | rem++;
| ^~~
| drem
jobs.cpp:70:7: error: expected ';' before 'q'
70 | ll q = n - rem;
| ^~
| ;
jobs.cpp:71:12: error: 'q' was not declared in this scope
71 | while (q > 0)
| ^