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 <iostream>
using namespace std;
#define in cin
#define out cout
#define PMODE
typedef long long int int64;
int64 swap(int64 &a, int64 &b)
{
int64 t = a; a = b; b = t;
}
int main()
{
int64 lh; in >> lh;
int64 s, d; in >> s >> d;
int64 l, b; in >> l >> b;
int64 res = 0;
if(b > l) {swap(s, d); swap(l, b);}
int64 s_attack_per_day = lh*2 - l;
res += s / s_attack_per_day;
if(s % s_attack_per_day != 0) {res++; d -= s % s_attack_per_day;}
int64 d_attack_per_day = lh*2 - b;
res += d / d_attack_per_day;
if(d % d_attack_per_day != 0) {res++;}
out << res << endl;;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |