結果

問題 No.909 たぴの配置
ユーザー leaf_1415leaf_1415
提出日時 2019-10-18 21:30:53
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 300 ms / 3,000 ms
コード長 468 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 52,376 KB
実行使用メモリ 6,716 KB
最終ジャッジ日時 2023-09-07 21:21:40
合計ジャッジ時間 6,294 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,384 KB
testcase_05 AC 294 ms
6,460 KB
testcase_06 AC 300 ms
6,716 KB
testcase_07 AC 279 ms
6,240 KB
testcase_08 AC 293 ms
6,356 KB
testcase_09 AC 300 ms
6,524 KB
testcase_10 AC 281 ms
6,232 KB
testcase_11 AC 273 ms
6,200 KB
testcase_12 AC 292 ms
6,480 KB
testcase_13 AC 298 ms
6,532 KB
testcase_14 AC 279 ms
6,216 KB
testcase_15 AC 278 ms
6,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#define llint long long

using namespace std;

llint n;
llint x[200005], y[200005];

int main(void)
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> n;
	for(int i = 1; i <= n; i++) cin >> x[i];
	for(int i = 1; i <= n; i++) cin >> y[i];
	
	llint mx = 1e18;
	for(int i = 1; i <= n; i++) mx = min(mx, x[i]+y[i]);
	cout << mx << endl;
	
	for(int i = 0; i <= n; i++) cout << min(x[i], mx) << endl;
	cout << mx << endl;
	
	return 0;
}
0