結果
| 問題 | 
                            No.909 たぴの配置
                             | 
                    
| コンテスト | |
| ユーザー | 
                             tekihei2317
                         | 
                    
| 提出日時 | 2019-10-19 08:36:43 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 286 ms / 3,000 ms | 
| コード長 | 616 bytes | 
| コンパイル時間 | 1,652 ms | 
| コンパイル使用メモリ | 168,656 KB | 
| 実行使用メモリ | 6,528 KB | 
| 最終ジャッジ日時 | 2024-06-26 10:28:58 | 
| 合計ジャッジ時間 | 7,759 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 13 | 
ソースコード
#include<bits/stdc++.h>
#define int long long
using namespace std;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
signed main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int N; cin>>N;
    vector<int> x(N),y(N);
    for(int i=0;i<N;i++) cin>>x[i];
    for(int i=0;i<N;i++) cin>>y[i];
    int ans=1e9;
    for(int i=0;i<N;i++) chmin(ans,x[i]+y[i]);
    
    cout<<ans<<endl<<0<<endl;
    for(int i=0;i<N;i++) cout<<min(x[i],ans)<<endl;
    cout<<ans<<endl;
    return 0;
}
            
            
            
        
            
tekihei2317