結果

問題 No.909 たぴの配置
ユーザー chocoruskchocorusk
提出日時 2019-10-18 21:28:33
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 382 ms / 3,000 ms
コード長 852 bytes
コンパイル時間 1,875 ms
コンパイル使用メモリ 107,972 KB
実行使用メモリ 4,928 KB
最終ジャッジ日時 2023-09-07 21:18:10
合計ジャッジ時間 8,454 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 369 ms
4,800 KB
testcase_06 AC 382 ms
4,844 KB
testcase_07 AC 350 ms
4,724 KB
testcase_08 AC 367 ms
4,804 KB
testcase_09 AC 381 ms
4,844 KB
testcase_10 AC 355 ms
4,892 KB
testcase_11 AC 347 ms
4,928 KB
testcase_12 AC 372 ms
4,880 KB
testcase_13 AC 372 ms
4,836 KB
testcase_14 AC 354 ms
4,764 KB
testcase_15 AC 350 ms
4,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
	int n;
	cin>>n;
	int x[200020], y[200020];
	for(int i=0; i<n; i++){
		cin>>x[i];
	}
	int mn=1e9+7;
	for(int i=0; i<n; i++){
		cin>>y[i];
		mn=min(mn, x[i]+y[i]);
	}
	cout<<mn<<endl;
	cout<<0<<endl;
	for(int i=0; i<n; i++){
		if(mn<=x[i]) cout<<mn<<endl;
		else cout<<x[i]<<endl;
	}
	cout<<mn<<endl;
    return 0;
}
0