제출 #1290421

#제출 시각아이디문제언어결과실행 시간메모리
1290421AishaSoccer (JOI17_soccer)C++20
5 / 100
1 ms576 KiB
#include "bits/stdc++.h" using namespace std; #define int long long const int mod = 1000000007; signed main() { int h, w; cin >> h >> w; int a, b, c; cin >> a >> b >> c; int n; cin >> n; int s1, t1, s2, t2; cin >> s1 >> t1 >> s2 >> t2; int ans = (abs(s1 - s2) + abs(t1 - t2)) * c; ans = min(ans, a * abs(s1 - s2) + b + abs(t1 - t2) * c); ans = min(ans, a * abs(t1 - t2) + b + abs(s1 - s2) * c); cout << ans << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...