結果

問題 No.2110 012 Matching
ユーザー みここみここ
提出日時 2022-12-11 21:21:25
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 325 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 2,055 ms
コンパイル使用メモリ 67,240 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-05 19:45:30
合計ジャッジ時間 5,319 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 82 ms
4,380 KB
testcase_02 AC 213 ms
4,380 KB
testcase_03 AC 143 ms
4,384 KB
testcase_04 AC 284 ms
4,384 KB
testcase_05 AC 200 ms
4,384 KB
testcase_06 AC 193 ms
4,380 KB
testcase_07 AC 325 ms
4,380 KB
testcase_08 AC 12 ms
4,380 KB
testcase_09 AC 47 ms
4,380 KB
testcase_10 AC 324 ms
4,380 KB
testcase_11 AC 2 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

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