結果

問題 No.909 たぴの配置
ユーザー wk1080idwk1080id
提出日時 2019-10-18 21:27:52
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 357 ms / 3,000 ms
コード長 1,249 bytes
コンパイル時間 914 ms
コンパイル使用メモリ 85,736 KB
実行使用メモリ 6,468 KB
最終ジャッジ日時 2023-09-07 21:14:59
合計ジャッジ時間 7,527 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 1 ms
4,384 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 357 ms
5,904 KB
testcase_06 AC 342 ms
6,468 KB
testcase_07 AC 308 ms
6,048 KB
testcase_08 AC 334 ms
5,892 KB
testcase_09 AC 345 ms
6,168 KB
testcase_10 AC 332 ms
5,952 KB
testcase_11 AC 325 ms
5,940 KB
testcase_12 AC 331 ms
6,220 KB
testcase_13 AC 342 ms
6,168 KB
testcase_14 AC 326 ms
5,896 KB
testcase_15 AC 334 ms
5,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cctype>
#include<math.h>
#include<string>
#include<string.h>
#include<stack>
#include<queue>
#include<vector>
#include<utility>
#include<set>
#include<map>
#include<stdlib.h>
#include<iomanip>
#include<complex>

using namespace std;

#define ll long long
#define ld long double
#define EPS 1e-9
#define INF 1e9
#define LINF (ll)INF*INF
#define MOD 1000000007
#define rep(i,n) for(int i=0;i<(n);i++)
#define loop(i,a,n) for(int i=a;i<(n);i++)
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)

#define int ll //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

typedef vector<int> vi;
typedef vector<string> vs;
typedef pair<int,int> pii;
typedef pair<pii,int> ppi;
typedef pair<int,pii> pip;
typedef vector<pii> vp;
typedef vector<vi> vvi;

int gcd(int a, int b){if(b==0) return a;return gcd(b,a%b);}
int lcm(int a, int b){return a/gcd(a,b)*b;}


signed main(void) {
    int n;
    cin >> n;
    int ans = INF;
    vi a(n),b(n);
    rep(i,n)cin >> a[i];
    rep(i,n)cin >> b[i];
    rep(i,n)ans = min(ans,a[i]+b[i]);
    cout << ans << endl;
    cout << 0 << endl;
    rep(i,n)cout << max(0LL,ans-b[i]) << endl;
    cout << ans << endl;
}
0