結果

問題 No.909 たぴの配置
ユーザー ats5515ats5515
提出日時 2019-10-18 23:13:44
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 304 ms / 3,000 ms
コード長 681 bytes
コンパイル時間 658 ms
コンパイル使用メモリ 77,444 KB
実行使用メモリ 6,196 KB
最終ジャッジ日時 2023-09-08 02:11:49
合計ジャッジ時間 6,322 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 288 ms
5,920 KB
testcase_06 AC 304 ms
6,148 KB
testcase_07 AC 282 ms
5,900 KB
testcase_08 AC 298 ms
5,876 KB
testcase_09 AC 303 ms
6,196 KB
testcase_10 AC 279 ms
5,964 KB
testcase_11 AC 278 ms
5,872 KB
testcase_12 AC 289 ms
5,968 KB
testcase_13 AC 300 ms
6,164 KB
testcase_14 AC 279 ms
6,136 KB
testcase_15 AC 279 ms
5,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <string>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <stdio.h>
using namespace std;
#define int long long
int MOD = 1000000007;
signed main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N;
	cin >> N;
	vector<int> A(N);
	vector<int> B(N);
	int res = 0;
	int mx = 1e9;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
	}
	for (int i = 0; i < N; i++) {
		cin >> B[i];
	}
	for (int i = 0; i < N; i++) {
		mx = min(mx, A[i]+ B[i]);
	}


	cout << mx << endl;
	cout << 0 << endl;
	for (int i = 0; i < N; i++) {
		cout << min(mx, A[i]) << endl;
	}
	cout << mx << endl;
}
0