結果

問題 No.2110 012 Matching
ユーザー soragsorag
提出日時 2022-10-28 22:56:33
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 767 bytes
コンパイル時間 1,586 ms
コンパイル使用メモリ 113,656 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-20 06:08:14
合計ジャッジ時間 4,595 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include<random>
#include<utility>
#include <vector>
#include <regex>
#include <map>
#include<string>
#include<queue>
#include<math.h>
#include<set>
#include<cstring>
#include<algorithm>
#define pb push_back
#define all(x) begin(x),end(x)
#define gall(x) begin(x),end(x),greater<>()
#define ll long long
#define P pair<int,int>
#define lP pair<ll,ll>
#define bit(x,i) (x>>i&1)
using namespace std;

int main(){
    int t;
    cin>>t;
    for(int i=0;i<t;i++){
        ll a,b,c,ans=0;
        cin>>a>>b>>c;
        ll mi=min(a,c);
        ans+=2*mi;
        a-=mi;
        c-=mi;
        ans+=2*(b/2);
        b=b%2;
        if(a>c) ans+=1;
        else {
        c--;
        ans+=c/2;
        }
        cout<<ans<<endl;
    }
  
    return 0;
}
0