結果
問題 | No.909 たぴの配置 |
ユーザー |
|
提出日時 | 2019-10-18 21:26:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 67 ms / 3,000 ms |
コード長 | 747 bytes |
コンパイル時間 | 2,279 ms |
コンパイル使用メモリ | 167,368 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-25 14:51:24 |
合計ジャッジ時間 | 4,795 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h>using namespace std::literals::string_literals;using i64 = std::int_fast64_t;using std::cout;using std::endl;using std::cin;template<typename T>std::vector<T> make_v(size_t a){return std::vector<T>(a);}template<typename T,typename... Ts>auto make_v(size_t a,Ts... ts){return std::vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));}int main() {int n; scanf("%d", &n); std::vector<int> x(n), y(n);for(int i = 0; i < n; i++) scanf("%d", &x[i]);for(int i = 0; i < n; i++) scanf("%d", &y[i]);int ans = 1 << 30;for(int i = 0; i < n; i++) ans = std::min(ans, x[i] + y[i]);printf("%d\n", ans);printf("0\n");for(auto v: x) printf("%d\n", std::min(ans, v));printf("%d\n", ans);return 0;}