# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
670518 | S2speed | Semiexpress (JOI17_semiexpress) | C++17 | 35 ms | 16860 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#define all(x) x.begin() , x.end()
#define sze(x) (ll)(x.size())
typedef long long ll;
const ll maxn = 3e3 + 17;
ll s[maxn];
vector<ll> v;
int main(){
ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
ll n , m , k , a , b , c , t;
cin>>n>>m>>k;
cin>>a>>b>>c;
cin>>t;
for(ll i = 0 ; i < m ; i++){
cin>>s[i]; s[i]--;
}
k -= m;
ll res = 0;
for(ll i = 0 ; i < m - 1 ; i++){
ll o = t - s[i] * b , h = o / a;
if(o < 0) break;
ll x = min(s[i] + h + 1 , s[i + 1]);
res += x - s[i];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |