Submission #6756

#TimeUsernameProblemLanguageResultExecution timeMemory
6756mrcamel쌍둥이 독수리 (GA7_twineagles)C++98
0 / 100
0 ms1664 KiB
#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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...