結果
| 問題 | No.2110 012 Matching |
| コンテスト | |
| ユーザー |
a01sa01to
|
| 提出日時 | 2024-01-31 00:20:38 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 610 bytes |
| 記録 | |
| コンパイル時間 | 1,917 ms |
| コンパイル使用メモリ | 191,460 KB |
| 最終ジャッジ日時 | 2025-02-19 00:49:07 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "settings/debug.cpp"
#define _GLIBCXX_DEBUG
#else
#define Debug(...) void(0)
#endif
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using ull = unsigned long long;
int main() {
int t;
cin >> t;
while (t--) {
ll a, b, c;
cin >> a >> b >> c;
ll ans = min(a, c);
a -= ans, c -= ans;
ans *= 2;
ans += b / 2 * 2;
b %= 2;
ans += c / 2 * 2;
c %= 2;
if (a > 0 && c == 1) ans += 2, c--, a--;
if (a > 0 && b == 1) ans++, a--, b--;
cout << ans << endl;
}
return 0;
}
a01sa01to