結果
問題 | No.2196 Pair Bonus |
ユーザー |
![]() |
提出日時 | 2023-01-20 22:31:32 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 69 ms / 2,000 ms |
コード長 | 525 bytes |
コンパイル時間 | 1,913 ms |
コンパイル使用メモリ | 194,984 KB |
最終ジャッジ日時 | 2025-02-10 05:02:25 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
#define rep(i,n) for(int i=0;i<(int)(n);i++)#define ALL(v) v.begin(),v.end()typedef long long ll;#include<bits/stdc++.h>using namespace std;int main(){ios::sync_with_stdio(false);std::cin.tie(nullptr);int n;cin>>n;vector<ll> A(2*n),B(2*n),X(n),Y(n);rep(i,2*n) cin>>A[i];rep(i,2*n) cin>>B[i];rep(i,n) cin>>X[i];rep(i,n) cin>>Y[i];ll ans=0;rep(i,n) ans+=max(max(A[2*i]+A[2*i+1],B[2*i]+B[2*i+1])+X[i],max(A[2*i]+B[2*i+1],B[2*i]+A[2*i+1])+Y[i]);cout<<ans<<endl;return 0;}