답안 #6756

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
6756 2014-07-05T14:22:29 Z mrcamel 쌍둥이 독수리 (GA7_twineagles) C++
0 / 100
0 ms 1664 KB
#include <iostream>
#include <fstream>
using namespace std;

ifstream fin("in.txt");

#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 -= 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;
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 1664 KB open (syscall #2) was called by the program (disallowed syscall)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 1664 KB open (syscall #2) was called by the program (disallowed syscall)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 1664 KB open (syscall #2) was called by the program (disallowed syscall)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 1664 KB open (syscall #2) was called by the program (disallowed syscall)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 1664 KB open (syscall #2) was called by the program (disallowed syscall)
2 Halted 0 ms 0 KB -