結果
問題 | No.909 たぴの配置 |
ユーザー | sggkshio |
提出日時 | 2019-12-09 00:41:04 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 363 ms / 3,000 ms |
コード長 | 757 bytes |
コンパイル時間 | 612 ms |
コンパイル使用メモリ | 83,988 KB |
実行使用メモリ | 4,744 KB |
最終ジャッジ日時 | 2023-08-30 23:25:50 |
合計ジャッジ時間 | 8,525 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,380 KB |
testcase_01 | AC | 2 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,380 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 1 ms
4,380 KB |
testcase_05 | AC | 348 ms
4,700 KB |
testcase_06 | AC | 363 ms
4,580 KB |
testcase_07 | AC | 335 ms
4,688 KB |
testcase_08 | AC | 356 ms
4,652 KB |
testcase_09 | AC | 360 ms
4,744 KB |
testcase_10 | AC | 347 ms
4,388 KB |
testcase_11 | AC | 339 ms
4,376 KB |
testcase_12 | AC | 349 ms
4,640 KB |
testcase_13 | AC | 359 ms
4,580 KB |
testcase_14 | AC | 336 ms
4,384 KB |
testcase_15 | AC | 337 ms
4,380 KB |
ソースコード
#define _USE_MATH_DEFINES #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> #include<math.h> #include<iomanip> #include<stdio.h> #include <stdlib.h> #include<stdio.h> #include <queue> #include<map> #include <sstream> #include<set> #include<stack> //#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int>a(n), b(n); for (int i = 0; i < n; i++)cin >> a[i]; for (int i = 0; i < n; i++)cin >> b[i]; int x = 9999999; for (int i = 0; i < n; i++)x = min(x, a[i] + b[i]); cout << x << endl; cout << 0 << endl; for (int i = 0; i < n; i++) { if (a[i] >= x)cout << x << endl; else cout << a[i] << endl; } cout << x << endl; return 0; }