結果
問題 | No.909 たぴの配置 |
ユーザー | Wataruaoki |
提出日時 | 2019-10-19 12:17:39 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 63 ms / 3,000 ms |
コード長 | 1,284 bytes |
コンパイル時間 | 601 ms |
コンパイル使用メモリ | 85,624 KB |
実行使用メモリ | 5,168 KB |
最終ジャッジ日時 | 2023-09-09 07:24:03 |
合計ジャッジ時間 | 3,896 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 60 ms
5,168 KB |
testcase_06 | AC | 62 ms
5,156 KB |
testcase_07 | AC | 57 ms
4,884 KB |
testcase_08 | AC | 61 ms
5,028 KB |
testcase_09 | AC | 63 ms
5,088 KB |
testcase_10 | AC | 58 ms
5,008 KB |
testcase_11 | AC | 57 ms
4,960 KB |
testcase_12 | AC | 59 ms
4,996 KB |
testcase_13 | AC | 61 ms
5,044 KB |
testcase_14 | AC | 57 ms
4,996 KB |
testcase_15 | AC | 57 ms
4,984 KB |
ソースコード
#include <iostream> #include <limits> #include <cfenv> #include <cmath> #include <algorithm> #include <array> #include <bitset> #include <cstring> #include <map> #include <stack> #include <set> #include <tuple> #include <queue> #include <vector> #include <cmath> #include <random> #include <math.h> #include <random> #include <functional> #define FOR(i, a, b) for(int (i) = (a); (i) < (b); ++(i)) #define REP(i, n) FOR(i, 0, n) #define rREP(i, n) for(int (i) = (n) - 1; (i) >= 0; --(i)) #define ALL(TheArray) TheArray.begin(), TheArray.end() using lli = long long int; using pii = std::pair<int, int>; template <class T> inline bool chmax(T& a, T b){ if(a < b){a = b; return true;} return false; } template <class T> inline bool chmin(T& a, T b){ if(a > b){a = b; return true;} return false; } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ constexpr int inf = 2e9; constexpr int MAX_SIZE = 2e5 + 10; int X[MAX_SIZE], Y[MAX_SIZE]; int main(void){ int n; scanf("%d", &n); int N = n + 2; REP(i, n) scanf("%d", X + i); REP(i, n) scanf("%d", Y + i); int d = inf; REP(i, n) chmin(d, X[i]+Y[i]); printf("%d\n0\n", d); REP(i, n) printf("%d\n", X[i] < d ? X[i] : d); printf("%d\n", d); return 0; }