結果
問題 |
No.2110 012 Matching
|
ユーザー |
|
提出日時 | 2022-10-28 22:22:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 590 bytes |
コンパイル時間 | 796 ms |
コンパイル使用メモリ | 85,732 KB |
最終ジャッジ日時 | 2025-02-08 14:40:04 |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 1 WA * 10 |
ソースコード
#include <iostream> #include <vector> #include <iomanip> #include <algorithm> #include <map> using namespace std; int main(){ int t;cin >> t; while(t--){ long long a,b,c; cin >> a >> b >> c; long long ans = 0; ans += (b/2)*2; if(b%2==0) b = 0; else b = 1; if(a<=c){ ans += a*2; c -= a; a = 0; ans += (c/2); }else if(c<a){ ans += c*2; a -= c; c = 0; if(b==1 && a==1) ans++; } cout << ans << endl; } }