제출 #253050

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
2530502020-07-26 18:48:41Tuk1352Semiexpress (JOI17_semiexpress)C++11
100 / 100
39 ms16864 KiB
#include <bits/stdc++.h>
using namespace std;
vector <long long> Ve;
int main()
{
ios::sync_with_stdio(false); cin.tie(0);
long long N, M, A, B, C, T, Su, k, Re=0;
int K;
cin >> N >> M >> K;
K -= M;
cin >> A >> B >> C >> T;
long long S[M];
cin >> S[0];
for (int i = 1; i < M; i++)
{
cin >> S[i];
Su = (S[i-1]-1)*B;
if (Su <= T)
{
k = (T-Su) / A;
long long ks = k+1, Mks=S[i]-S[i-1];
Re += min(k+1, Mks);
for (int y = 1; y <= K; y++)
{
if (Su + ks*C > T)
{
break;
}
k = (T-Su-ks*C) / A;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...