# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
931239 |
2024-02-21T12:24:16 Z |
De3b0o |
Soccer (JOI17_soccer) |
C++14 |
|
1 ms |
348 KB |
#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define in insert
#define er erase
#define pb push_back
#define ppb pop_back()
#define ph push
#define pp pop()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "YES" << "\n";
#define no cout << "NO" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define sqr 340
#define mod 1000000007
#define mid (l+r)/2
using namespace std;
int main()
{
d3
ll h , w;
cin >> h >> w;
ll a , b , c;
cin >> a >> b >> c;
ll n;
cin >> n;
pll pos[n];
for(int i = 0 ; n>i ; i++)
{
ll x,y;
cin >> x >> y;
pos[i]={x,y};
}
if(n==2)
{
ll x = abs(pos[0].F-pos[1].F);
ll y = abs(pos[0].F-pos[1].S);
ll ans = (x+y)*c;
ans=min(ans,min(y*a+b+x*c,x*a+b+y*c));
cans
return 0;
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |