結果
| 問題 |
No.2196 Pair Bonus
|
| コンテスト | |
| ユーザー |
Manuel1024
|
| 提出日時 | 2023-01-20 21:36:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 252 ms / 2,000 ms |
| コード長 | 675 bytes |
| コンパイル時間 | 844 ms |
| コンパイル使用メモリ | 94,076 KB |
| 実行使用メモリ | 8,064 KB |
| 最終ジャッジ日時 | 2024-06-23 09:29:49 |
| 合計ジャッジ時間 | 3,293 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <queue>
#include <deque>
#include <cmath>
#include <iomanip>
#include <set>
#include <map>
using namespace std;
using ll = long long;
using ld = long double;
int main(){
int n; cin >> n;
vector<ll> a(n*2), b(n*2);
for(auto &it: a) cin >> it;
for(auto &it: b) cin >> it;
vector<ll> x(n), y(n);
for(auto &it: x) cin >> it;
for(auto &it: y) cin >> it;
ll ans = 0;
for(int i = 0; i < n; i++){
ans += max(max(a[i*2]+a[i*2+1], b[i*2]+b[i*2+1])+x[i],
max(a[i*2]+b[i*2+1], b[i*2]+a[i*2+1])+y[i]);
}
cout << ans << endl;
return 0;
}
Manuel1024