Submission #1159876

#TimeUsernameProblemLanguageResultExecution timeMemory
1159876rdabaSoccer (JOI17_soccer)C++17
0 / 100
0 ms324 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios::sync_with_stdio(0); cin.tie(0); ll h,w; cin >> h >> w; ll a,b,c; cin >> a >> b >> c; ll n; cin >> n; ll a1,b1,a2,b2; cin >> a1 >> b1 >> a2 >> b2; if (a1==a2 && b1==b2) return 0,0; ll x=a2-a1,y=b2-b1; ll mn=(x*c)+(y*c); ll mn1=(x*c)+(y*a+b); ll mn4=(x*a+b)+(y*c); cout << min({mn,mn1,mn4}); } //1 0 0 //0 0 0 //0 0 0 //0 0 1 //0 15 10
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...