結果

問題 No.909 たぴの配置
ユーザー misora192misora192
提出日時 2020-04-29 21:08:08
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 52 ms / 3,000 ms
コード長 459 bytes
コンパイル時間 1,389 ms
コンパイル使用メモリ 166,604 KB
実行使用メモリ 4,640 KB
最終ジャッジ日時 2023-08-20 00:16:43
合計ジャッジ時間 4,391 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 48 ms
4,620 KB
testcase_06 AC 50 ms
4,536 KB
testcase_07 AC 46 ms
4,616 KB
testcase_08 AC 50 ms
4,532 KB
testcase_09 AC 52 ms
4,616 KB
testcase_10 AC 48 ms
4,376 KB
testcase_11 AC 48 ms
4,376 KB
testcase_12 AC 49 ms
4,572 KB
testcase_13 AC 51 ms
4,572 KB
testcase_14 AC 48 ms
4,640 KB
testcase_15 AC 47 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i=(0);i<(n);i++)

using namespace std;

typedef long long ll;
typedef pair<ll, ll> pll;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n;
	cin >> n;

	vector<int> x(n), y(n);
	rep(i, n) cin >> x[i];
	rep(i, n) cin >> y[i];

	int mn = 1e9;
	rep(i, n) mn = min(mn, x[i] + y[i]);

	cout << mn << "\n";
	cout << 0 << "\n";
	rep(i, n){
		cout << max(mn - y[i], 0) << "\n";
	}
	cout << mn << "\n";
}
0