Submission #489100

#TimeUsernameProblemLanguageResultExecution timeMemory
489100cheissmartSemiexpress (JOI17_semiexpress)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #pragma GCC optimize("trapv") #define IO_OP ios::sync_with_stdio(0), cin.tie(0) #define F first #define S second #define V vector #define PB push_back #define EB emaplce_back #define MP make_pair #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; typedef pair<int, int> pi; typedef vector<int> vi; const int INF = 1e9 + 7, N = 3005; int s[N]; signed main() { IO_OP; int n, m, k, a, b, c; ll t; cin >> n >> m >> k >> a >> b >> c >> t; assert(k >= m); k -= m; int ans = 0; for(int i = 0; i < m; i++) { cin >> s[i]; } vi tt; for(int i = 0; i < m - 1; i++) { ll now = 1LL * (s[i] - 1) * b; int pos = s[i]; vi aux; while(now <= t && pos < s[i + 1] && int(aux.size()) < k + 1) { // now + a * x <= t // pos + x < s[i + 1] ll x = min<ll>((t - now) / a, s[i + 1] - pos - 1); assert(x >= 0); aux.PB(x + 1); pos = pos + x + 1; now += 1LL * (x + 1) * c; } if(aux.size()) { ans += aux[0]; for(int i = 1; i < int(aux.size()); i++) { assert(aux[i] <= aux[i - 1]); tt.PB(aux[i]); } } } if(1LL * (s[m - 1] - 1) * b <= t) ans++; sort(ALttL(), greater<int>()); for(int i = 0; i < min(int(tt.size()), k); i++) ans += tt[i]; ans--; cout << ans << '\n'; }

Compilation message (stderr)

semiexpress.cpp: In function 'int main()':
semiexpress.cpp:59:7: error: 'ALttL' was not declared in this scope; did you mean 'ALL'?
   59 |  sort(ALttL(), greater<int>());
      |       ^~~~~
      |       ALL