結果
問題 | No.2110 012 Matching |
ユーザー |
![]() |
提出日時 | 2022-10-28 22:32:28 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 446 bytes |
コンパイル時間 | 1,904 ms |
コンパイル使用メモリ | 193,068 KB |
最終ジャッジ日時 | 2025-02-08 14:45:20 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 10 |
ソースコード
#include <bits/stdc++.h>using namespace std;#define int long longsigned main(){int T;cin>>T;for(int i=0;i<T;i++){int a,b,c;cin>>a>>b>>c;int ans = b+2*c;int x = min(a,c);a -= x;c -= x;if(!c){if((b+c)%2) ans -= 1+(!b);cout<<ans<<endl;continue;}b %= 2;ans -= ((b+c)/2)*3;if((b+c)%2) ans -= 1+(!b);cout<<ans<<endl;}}