結果
問題 |
No.2110 012 Matching
|
ユーザー |
![]() |
提出日時 | 2023-09-23 23:35:12 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 762 bytes |
コンパイル時間 | 1,638 ms |
コンパイル使用メモリ | 191,816 KB |
最終ジャッジ日時 | 2025-02-17 01:50:00 |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 11 |
ソースコード
#include <bits/stdc++.h> #include<iostream> #include<map> #include<vector> #include <algorithm> #include<math.h> #include <iomanip> #include<set> #include <numeric> #include<string> using ll = long long; using namespace std; int main() { ll t, a, b, c; cin >> t; for (int i = 0; i < t; i++){ ll max1 = 0; cin >> a >> b >> c; if (a && c){ ll tmp = min(a, c); max1 += tmp*2; if (a >= c){ a -= c; c = 0; } else { c -= a; a = 0; } } if (b%2) max1 += (b-1); else max1 += b; if (c && c%2) max1 += (c - 1); else if (c) max1 += c; cout << max1 << "\n"; } }