結果
| 問題 | No.2110 012 Matching | 
| コンテスト | |
| ユーザー |  srjywrdnprkt | 
| 提出日時 | 2023-05-05 17:32:25 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 362 ms / 2,000 ms | 
| コード長 | 608 bytes | 
| コンパイル時間 | 1,004 ms | 
| コンパイル使用メモリ | 103,296 KB | 
| 最終ジャッジ日時 | 2025-02-12 17:15:58 | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 11 | 
ソースコード
#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>
using namespace std;
using ll = long long;
int main(){
    ll T, A, B, C, ans, mi;
    cin >> T;
    while(T){
        T--;
        cin >> A >> B >> C;
        mi = min(A, C);
        ans = mi * 2;
        A -= mi;
        C -= mi;
        ans += (C / 2);
        ans += (B / 2) * 2;
        B -= (B / 2) * 2;
        ans += min(A, B);
        cout << ans << endl;
    }
    return 0;
}
            
            
            
        