結果
問題 | No.909 たぴの配置 |
ユーザー | beet |
提出日時 | 2019-10-18 21:24:37 |
言語 | C++17 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 381 ms / 3,000 ms |
コード長 | 561 bytes |
コンパイル時間 | 2,373 ms |
コンパイル使用メモリ | 200,672 KB |
実行使用メモリ | 6,284 KB |
最終ジャッジ日時 | 2023-09-07 21:09:09 |
合計ジャッジ時間 | 8,262 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 367 ms
6,044 KB |
testcase_06 | AC | 379 ms
6,240 KB |
testcase_07 | AC | 352 ms
5,896 KB |
testcase_08 | AC | 365 ms
6,020 KB |
testcase_09 | AC | 381 ms
6,216 KB |
testcase_10 | AC | 353 ms
5,880 KB |
testcase_11 | AC | 346 ms
5,884 KB |
testcase_12 | AC | 357 ms
5,956 KB |
testcase_13 | AC | 376 ms
6,284 KB |
testcase_14 | AC | 354 ms
5,884 KB |
testcase_15 | AC | 351 ms
5,944 KB |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} //INSERT ABOVE HERE signed main(){ Int n; cin>>n; vector<Int> xs(n),ys(n); for(Int i=0;i<n;i++) cin>>xs[i]; for(Int i=0;i<n;i++) cin>>ys[i]; Int t=xs[0]+ys[0]; for(Int i=0;i<n;i++) chmin(t,xs[i]+ys[i]); cout<<t<<endl; cout<<0<<endl; for(Int i=0;i<n;i++) cout<<min(xs[i],t)<<endl; cout<<t<<endl; return 0; }