Submission #837323

# Submission time Handle Problem Language Result Execution time Memory
837323 2023-08-25T09:34:39 Z Liudas Soccer (JOI17_soccer) C++17
5 / 100
1 ms 212 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
	int H, W, A, B, C, N;
	cin >> H>> W>> A>> B>> C>> N;
	vector<int> px(N), py(N);
	for(int i = 0; i < N; i ++){
		cin >> px[i] >> py[i];
	}
	if(N == 2){
		int dx = labs(px[0]-px[1]), dy = labs(py[0]-py[1]);
		int a = (dx + dy) * C;
		int b = min({dx * A + B + dy * C, dy * A + B + dx * C, a});
		cout << b << endl;
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Incorrect 0 ms 212 KB Output isn't correct
7 Halted 0 ms 0 KB -