結果

問題 No.2110 012 Matching
ユーザー みここ
提出日時 2022-12-11 21:21:25
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 361 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 668 ms
コンパイル使用メモリ 67,528 KB
最終ジャッジ日時 2025-02-09 09:46:26
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long ll;

int main()
{
    int t;
    cin >> t;
    while (t--)
    {
        ll a, b, c;
        cin >> a >> b >> c;
        if (a > c)
        {
            cout << b + c * 2 << endl;
        }
        else
        {
            cout << b / 2 * 2 + a * 2 + (c - a) / 2 << endl;
        }
    }
}
0