#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 |
1 |
Correct |
0 ms |
1672 KB |
Output is correct |
2 |
Correct |
0 ms |
1672 KB |
Output is correct |
3 |
Correct |
0 ms |
1672 KB |
Output is correct |
4 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |