답안 #648170

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
648170 2022-10-05T16:01:18 Z baibhav26062008 Self Study (JOI22_ho_t2) C++14
10 / 100
336 ms 2624 KB
#include <bits/stdc++.h>
using namespace std;

int main() {
	int n , m;
	cin >> n >> m;
	int A[n],B[n];
	
	for (int i = 0; i < n; i++) {
		cin >> A[i];
	}
	for (int j = 0; j < n; j++) {
		cin >> B[j];
	}
	if (m == 1) {
		int min1= INT_MAX;
		for (int i = 0; i < n; i++) {
			int v = max(A[i],B[i]);
			if (v < min1) min1 = v;
		}
		cout << min1 << endl;
		return 0;
	}
	vector <int> v(n);
	for (int i = 0; i < n; i++) {
		v[i] = A[i] * m;
	} 
	int min2 = INT_MAX;
	for (int i = 0; i < n; i++) {
		if (v[i] < min2) {
			min2 = v[i];
		}
	}
	cout << min2 << endl;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 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 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 4 ms 212 KB Output is correct
11 Correct 231 ms 2616 KB Output is correct
12 Correct 336 ms 2616 KB Output is correct
13 Correct 159 ms 2516 KB Output is correct
14 Correct 198 ms 2616 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 80 ms 2516 KB Output is correct
17 Correct 267 ms 2624 KB Output is correct
18 Correct 231 ms 2516 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 80 ms 2516 KB Output is correct
3 Correct 267 ms 2624 KB Output is correct
4 Correct 231 ms 2516 KB Output is correct
5 Incorrect 0 ms 212 KB Output isn't correct
6 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 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 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 4 ms 212 KB Output is correct
11 Correct 231 ms 2616 KB Output is correct
12 Correct 336 ms 2616 KB Output is correct
13 Correct 159 ms 2516 KB Output is correct
14 Correct 198 ms 2616 KB Output is correct
15 Incorrect 0 ms 212 KB Output isn't correct
16 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 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 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 4 ms 212 KB Output is correct
11 Correct 231 ms 2616 KB Output is correct
12 Correct 336 ms 2616 KB Output is correct
13 Correct 159 ms 2516 KB Output is correct
14 Correct 198 ms 2616 KB Output is correct
15 Incorrect 0 ms 212 KB Output isn't correct
16 Halted 0 ms 0 KB -