Submission #6757

# Submission time Handle Problem Language Result Execution time Memory
6757 2014-07-05T14:23:55 Z mrcamel 쌍둥이 독수리 (GA7_twineagles) C++
0 / 100
0 ms 1672 KB
#include <iostream>
using namespace std;

#define in cin
#define out cout

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 -= lh;}

    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 Correct 0 ms 1672 KB Output is correct
5 Correct 0 ms 1672 KB Output is correct
6 Correct 0 ms 1672 KB Output is correct
7 Correct 0 ms 1672 KB Output is correct
8 Correct 0 ms 1672 KB Output is correct
9 Correct 0 ms 1672 KB Output is correct
10 Correct 0 ms 1672 KB Output is correct
11 Correct 0 ms 1672 KB Output is correct
12 Correct 0 ms 1672 KB Output is correct
13 Correct 0 ms 1672 KB Output is correct
14 Incorrect 0 ms 1672 KB Output isn't correct
15 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 -