結果

問題 No.909 たぴの配置
ユーザー yakkiyakki
提出日時 2019-10-18 21:50:51
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 389 ms / 3,000 ms
コード長 851 bytes
コンパイル時間 615 ms
コンパイル使用メモリ 86,216 KB
実行使用メモリ 5,564 KB
最終ジャッジ日時 2023-09-07 21:56:27
合計ジャッジ時間 7,087 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 375 ms
5,564 KB
testcase_06 AC 389 ms
5,488 KB
testcase_07 AC 347 ms
5,232 KB
testcase_08 AC 365 ms
5,416 KB
testcase_09 AC 374 ms
5,544 KB
testcase_10 AC 348 ms
5,220 KB
testcase_11 AC 346 ms
5,140 KB
testcase_12 AC 354 ms
5,528 KB
testcase_13 AC 374 ms
5,484 KB
testcase_14 AC 352 ms
5,108 KB
testcase_15 AC 348 ms
5,148 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<bitset>
#include<set>
#include<map>
#include<stack>
#include<queue>
#include<deque>
#include<list>
#include<iomanip>
#include<cmath>
#include<cstring>
#include<functional>
using namespace std;
 
#define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repr(i, 0, n)
#define INF 2e9
#define MOD 1000000007
//#define MOD 998244353
#define LINF (long long)4e18
#define jck 3.141592
 
using ll = long long;
using Pi = pair<int,int>;
using Pl = pair<ll,ll>;



int main(){
	int N; cin >> N;
	vector<int> X(N),Y(N);
	rep(i,N) cin >> X[i];
	int M = INF;
	rep(i,N){
		cin >> Y[i];
		M = min(X[i]+Y[i],M);
	}
	vector<int> ans(N+2);
	ans[N+1] = M;
	rep(i,N){
		ans[i+1] = min(X[i],M);
	}
	cout << M << endl;
	rep(i,N+2){
		cout << ans[i] << endl;
	}
	
}
0