結果

問題 No.909 たぴの配置
ユーザー ttttan2ttttan2
提出日時 2019-10-18 21:30:18
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 295 ms / 3,000 ms
コード長 1,341 bytes
コンパイル時間 2,336 ms
コンパイル使用メモリ 144,724 KB
実行使用メモリ 6,576 KB
最終ジャッジ日時 2023-09-07 21:20:43
合計ジャッジ時間 7,657 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 267 ms
6,576 KB
testcase_06 AC 282 ms
6,504 KB
testcase_07 AC 271 ms
6,236 KB
testcase_08 AC 292 ms
6,364 KB
testcase_09 AC 295 ms
6,480 KB
testcase_10 AC 263 ms
6,232 KB
testcase_11 AC 258 ms
6,200 KB
testcase_12 AC 268 ms
6,400 KB
testcase_13 AC 273 ms
6,516 KB
testcase_14 AC 250 ms
6,252 KB
testcase_15 AC 244 ms
6,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
//ios::sync_with_stdio(false);cin.tie(0);
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef pair<pii,int> ppii;
typedef pair<int,pii> pipi;
typedef pair<ll,ll> pll;
typedef pair<pll,ll> ppll;
typedef pair<ll,pll> plpl;
typedef tuple<ll,ll,ll> tl;
ll mod=1000000007;
ll mod2=998244353;
ll mod3=1000003;
ll mod4=998244853;
ll inf=1000000000000000000;
double pi=2*acos(0);
#define rep(i,m,n) for(ll i=m;i<n;i++)
#define rrep(i,n,m) for(ll i=n;i>=m;i--)
int dh[4]={1,-1,0,0};
int dw[4]={0,0,1,-1};
int ddh[8]={-1,-1,-1,0,0,1,1,1};
int ddw[8]={-1,0,1,-1,1,-1,0,1};
ll lmax(ll a,ll b){
    if(a<b)return b;
    else return a;
}
ll lmin(ll a,ll b){
    if(a<b)return a;
    else return b;
}
ll gcd(ll a,ll b){
    if(a<b)swap(a,b);
    if(b==0)return a;
    if(a%b==0)return b;
    return gcd(b,a%b);
}
ll Pow(ll n,ll k){
    ll ret=1;
    ll now=n;
    while(k>0){
        if(k&1)ret*=now;
        now*=now;
        k/=2;
    }
    return ret;
}
int main(){
    ios::sync_with_stdio(false);cin.tie(0);
    int n;cin>>n;
    ll x[n],y[n];
    rep(i,0,n)cin>>x[i];
    rep(i,0,n)cin>>y[i];
    ll mi=1000000000;
    rep(i,0,n){
        mi=min(mi,x[i]+y[i]);
    }
    cout<<mi<<endl;
    cout<<0<<endl;
    rep(i,0,n)cout<<min(mi,x[i])<<endl;
    cout<<mi<<endl;
}
0